Linux command: git

From RHS Wiki
Revision as of 04:16, 7 April 2015 by Rafahsolis (talk | contribs) (Protected "Linux command: git" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
Jump to navigation Jump to search

Clone

git clone <repository_path>

add/commit/push

git add .
git add -a
git add -A
git commit -m "Message of commit"
git push origin master

Branching

git checkout <branch_name>
git merge

Undo last changes

git checkout -- .

add remote

git remote add <repository_name> <repository_path>

list remote

git remote -v

remove remote

git rm <repository_name>

pull/push

git push <repository_name>
git pull <repository_name>