2,229
edits
(start with a little Git introduction) |
m (→Introduction: fetch+merge -> pull) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Introduction == | == Introduction == | ||
If you have never used [http://git-scm.com/ Git] before, here is a quick intro to get you started | If you have never used [http://git-scm.com/ Git] before, here is a quick intro to get you started. For Dolphin-specific workflows, read the [[Contributor's Guide]]. | ||
First, set up Git: | First, set up Git: | ||
Line 15: | Line 15: | ||
git checkout -b cool_new_feature # create a branch for what you are working on | git checkout -b cool_new_feature # create a branch for what you are working on | ||
$EDITOR some/file.cpp # serious hacking | $EDITOR some/file.cpp # serious hacking | ||
git status # | git status # show changed, new or deleted files | ||
git add some/file.cpp # mark changes to be committed (adds them to the "staging area") | git add some/file.cpp # mark changes to be committed (adds them to the "staging area") | ||
git status # | git status # show what is staged | ||
git commit # editor pops up, edit the commit message, save, close | git commit # editor pops up, edit the commit message, save, close | ||
git push origin cool_new_feature # publish the branch at GitHub | git push origin cool_new_feature # publish the branch at GitHub | ||
Line 28: | Line 28: | ||
<pre> | <pre> | ||
git remote add upstream https://github.com/dolphin-emu/dolphin.git # add a separate remote for the main repository | git remote add upstream https://github.com/dolphin-emu/dolphin.git # add a separate remote for the main repository | ||
git remote -v | git remote -v # show remotes, you have two now (origin and upstream) | ||
git checkout master # make sure you are on the master branch | |||
git checkout master | git pull --ff-only upstream # pull in new commits from upstream | ||
git | |||
</pre> | </pre> | ||
Line 48: | Line 47: | ||
It may be useful to know that Git branches are actually just labelled pointers into the commit graph. | It may be useful to know that Git branches are actually just labelled pointers into the commit graph. | ||
[[Category:Development]] | |||
edits