Git commands

git_upload_push # # Description: Debian GNU/Linux 7.7 (wheezy) 3.16.0-0.bpo.4-amd64 15_01_07 # git version 1.7.10.4 # My basic git commands: git clone https:// git status git add [filename] git commit -a -m "description" git push
 * 1) 1 SMP Debian 3.16.7-ckt2-1~bpo70+1 (2014-12-08)

git pull # Example: git clone https://github.com/grik/neuroimaging echo "icotera?" >> fsl.txt git status git add fsl.txt git commit -a -m "commiting fsl.txt" git push # # Some advanced git commands: sudo apt-get install git git config --global user.name "debian-sh" git config --global user.email bestmatrix@gmail.com git config --global core.editor subl git config --global merge.tool vimdiff git config --list git clone https://github.com/debian-sh/microCMS.git cd m* git status Create files and add to git: git status git add pierwszy_plik.rozszerzenie git remote -v git remote add origin https://github.com/debian-sh/microCMS.git git fetch origin git pull git push origin master git commit -m 'first commit' git remote add origin git@github.com:debian-sh/microCMS.git git push origin master # DOWNLOAD CHANGES (befor we start our job downloads others) git fetch origin git pull

#

UPLOADING CHANGES (3 phases: STAGE, COMMIT, PUSH)

STAGE - "adds files" git add test.txt "add all files" git add * COMMIT - "confirm changes for only STAGED files" git commit -m "second commit" PUSH - "pushing changes outside" git push origin master # undo last commit git reset --hard e7161f5  <--- id commita git push origin HEAD --force

# # Sources #