git config --global user.name some.body
git config --global user.email some.body@cern.ch
git add ./PATH/TO/SOMETHING
git rm ./PATH/TO/SOMETHING
git rm --cached ./PATH/TO/SOMETHING
git mv ./PATH/TO/SOMETHING ./PATH/TO/SOMEWHERE/ELSE
git commit -m "a comment what happened here"
(with -a
an implicit add
is done)
git branch OtherBranch
git checkout OtherBranch
git log
git show 123456789abcdefg1011121314
git remote -v
BRANCH
to the remote user origin git push origin BRANCH
BRANCH
and merge it into your local branch git pull origin BRANCH
git fetch origin BRANCH
BRANCH
into the local files of the active branch do git merge BRANCH
.gitignore_global
can be placed in the home directory and added to the git-configuration with git config --global core.excludesfile ~/.gitignore_global
*.o *.so *.pyc
Your branch is ahead of 'origin/master' by # commits.
cherry-pick
command can be used, e.g. in a =beta=-branch a small bug-fix works and one would like to implement the fix already in the =master=-branch without merging the branches completely. git checkout beta git log -1
commit 67f90a0768efc5eb...
master=-branch and =cherry-pick
this commit to be merged git cherry-pick 67f90a0768efc