Third, the management of remote warehouse
1, Remote git / git Remote -v
bakkdoor git: //github.com/bakkdoor/grit.git
cho45 git: //github.com/cho45/grit.git
defunkt git: //github.com /defunkt/grit.git
Koke git: //github.com/koke/grit.git
origin [email protected]: mojombo / grit.git --- clone when
- is added by default origin remote libraries and tracking remote master branch
2 add a remote repository
git the Add remote pb git: //github.com/paulboone/ticgit.git
3, grab the remote data repository
git fetch pb ---- there is no local to remote updates to the local library
this command to remote repository pulls data from all your local repository has not. After the run is complete, you can access the remote repository in the local
all branches, which will be merged into a local branch, or just remove a branch, check it out.
! ! ! ! fetch command to the remote data just pulled local warehouse, it does not automatically merged into the current working branch, only if you are really ready
, and to manually merge.
! ! ! After the local branch can not be modified remotely, only locally modified push updates to the server, and then git fetch again,
you will get to update the remote branch
! ! ! FETCH pull == + Git Git Git Merge . 4, push data to a remote repository git push origin master-- the default master branch, pushed to the remote master branch 5 ,! ! ! ! View remote repository of information - view the remote branch warehouses situation git Remote Show Origin 6, rename the remote repository git the rename pb Remote Pb2 7, delete the git remote rm pb
Managing remote repositories
Guess you like
Origin www.cnblogs.com/justart/p/11519792.html
Ranking