Wednesday, August 9, 2017

GIT personal

GIT Authentication failed for push
$ git config --global user.name "user1"
$ git config --global user.email "user1@gmail.com"

Create New Branch 
git checkout -b new-branch existing-branch
This creates a new branch new-branch, based on existing-branch.

Check status 
git status 
git add.
git commit -m "remark"
Only one time 
git push --set-upstream origin branch_name

or 
git push 
Git change one branch to another branch 
git checkout branch_name


Git show Branch
git branch -a
git branch -r

Git Delete Local Branch
git branch -d branch_name
Git Delete Remote Branch
git push origin --delete branch_name
If there are unmerged changes which you are confident of deleting:
$ git branch -D branch_name

No comments:

Post a Comment