-
Notifications
You must be signed in to change notification settings - Fork 0
Git Manuals
Sajjad Rad edited this page Nov 4, 2015
·
3 revisions
You can find some useful git commands:
run this command for add your full name:
git config --global user.name "YOUR_NAME"
and run this for add your email:
git config --global user.email YOUR_EMAIL
cd to your project root directory and run:
git init
git clone [url]
cd to your project root directory and run:
git remote add origin [url]
cd to your project root directory and run:
git remote -v
git status
git checkout -b [branch name]
git checkout [branch name]
git branch -d [branch name]
git add -A
git commit -m "Message"
sometimes you want to switch to another branch but your work is in progress and you don't want to commit changes.you can stash changes and switch to other branches and use stash again in future.
git stash
git stash list
git stash apply stash@{ID}
or for apply last stash
git stash apply
git log
git commit --amend -m "Message"
git push origin [branch-name]
git pull --rebase origin [branch name]
For resolving conflicts you should run git merge tools.Kdiff3 is one of good merge tools.
git mergetool