Thursday 21 September 2017

besic git commond


//for initilize git
git init
git pull
git push
git commit -m "enter message"
git add .
git checkout filename
git status //for check status
git branch // check current branch
git clone git url // get clone from server
git checkout master //change branch
//check remote directory
git remote -v
//if you have not cloned an existing repository and want to connect your
git remote add origin <server>
//add brnach merge
 git merge <branch>
//diffence file
git diff file name filename
//replace local chenges
git checkout
 git fetch origin
If you instead want to drop all your local changes and commits, fetch the latest history from the server and point your local master branch at it like this
git fetch origin
git reset --hard origin/master

No comments:

Post a Comment