Check Out A Repository
git clone /path/to/repository
Display All Branch:git branch
Display Status Of Branchgit status
Create A New branch :
git checkout -b
Delete branch :
git branch -d
Update Existing Branch :git fetch origin && git reset --hard origin/branch_name
Pull Branch From Remote When Branch is not avilable :git fetch origin && git checkout --track origin/branch_name
If Branch Is Avilable Then Pull Branch :git pull origin branch_name
Commit Changes :
git commit -m "Commit message"
Merge Branch :git merge --squash Branch_Name
Push Branch Up To Remote :git push origin branch_name
Undo local changes :
git checkout filename
Drop Your Changes And Update From Rmote :
git reset --hard origin/branch_name
gitignore : Ignore file to update on remote# ignore an entire directory
/mydebugdir/*
# ignore a file type
*.orig
Comments
Post a Comment