-
Notifications
You must be signed in to change notification settings - Fork 0
git beginners
koem edited this page Sep 27, 2011
·
7 revisions
- start with this two pages: github set up and fork a repo
- set up: Attention: you don't have to remove your .ssh directory, you can use your existing keys
- forking: when you do
git remote add upstream
then replaceoctocat
with your username - refresh the code on your computer with the newest developments:
git fetch upstream
git merge upstream/master
- If you already have local changes preventing the merge, there are mainly two options:
Either: Commit your changes (normally it is sufficient to do agit commit -a
) and merge again
Or: Stash away your changes (git stash
) merge again and then re-apply the changes (git stash --apply
) - upload your development:
-
git commit -a
- give a comment in the opened file git push
- Pull Request: request that your commit will be merged into the master branch. Easiest way would be:
- open github.com
- login
- klick on your name
- search for your last commit ( pushed to master at ...)
- klick on the link
- klick "Pull Request"
- fill out form and submit pull request
Show differences:
- check what a
git commit
would upload / what did you do since your last commit:git diff
- check what a
git merge upstream/master
would do with the code on your computer:git diff ...upstream/master
(taken from http://stackoverflow.com/questions/5817579/how-can-i-preview-a-merge-in-git)