just a logo :)


See as: raw | code

terms of service | imprint

is powered by m1d1

Git Origins
(Entry Nr. 3282, by user 1 | edit)


git clone https://github.com/[username]/[repository]

Cloning will automatically set the original repo as the remote with the name 'origin'.


git add -A; git commit -m "I did some changes";git push https://github.com/[username]/[repository]

Pushing will not update the working directory. To do so, you have to run this command in the working directory of the remote repo: git checkout HEAD -- .


git pull https://github.com/[username]/[repository]

Add a remote

git remote add someRemote /path/to/some/repo/

Fetch from a remote

git fetch someRemote

What changed in the remote?

git log master..someRemote/master

I use this to see the oldest new commits first and see what changed:

git log -p --reverse master..c-af/master


When one of fetched commits is alright and you want to merge it into your repo:

git merge <hash_of_the_commit>

To avoid merge commits, rebase might be better:

git rebase <hash_of_the_commit>
Create a new entry at this position