Git: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 1: | Line 1: | ||
=Download a git repository= | |||
git clone git@www.halfface.se:project.git | git clone git@www.halfface.se:project.git | ||
=which changes has occured= | |||
git status | git status | ||
=commit changes= | |||
git commit -a -m "updated ..." | git commit -a -m "updated ..." | ||
=push changes upsteam= | |||
git push | git push | ||
git push origin master | git push origin master | ||
=list branches= | |||
git branch -a | git branch -a | ||
git branch -r | git branch -r | ||
=Change branch= | |||
git checkout remotes/origin/code-18500 | git checkout remotes/origin/code-18500 | ||
=Change branch= | |||
git branch master | git branch master | ||
=git pull= | |||
sync up against git head | sync up against git head | ||
git pull | git pull | ||
Line 26: | Line 31: | ||
=If you want to get a list of all files that ever existed= | =If you want to get a list of all files that ever existed= | ||
git log --pretty=format: --name-status | cut -f2- | sort -u | git log --pretty=format: --name-status | cut -f2- | sort -u | ||
=show where git repository is coming from= | |||
git remote show origin= |
Revision as of 09:35, 27 June 2016
Download a git repository
git clone git@www.halfface.se:project.git
which changes has occured
git status
commit changes
git commit -a -m "updated ..."
push changes upsteam
git push git push origin master
list branches
git branch -a git branch -r
Change branch
git checkout remotes/origin/code-18500
Change branch
git branch master
git pull
sync up against git head
git pull
list files from specific branch, e.g. master
git ls-tree -r master --name-only
If you want to get a list of all files that ever existed
git log --pretty=format: --name-status | cut -f2- | sort -u
show where git repository is coming from
git remote show origin=