Git常用命令与配置

git服务器搭建相关命令

参考网址1:http://weizhifeng.net/build-git-server-with-gitosis.html

参考网址2http://joesay.iteye.com/blog/1541911

 

git仓库设置相关命令

 

参考网址:https://help.github.com/articles/changing-a-remote-s-url

 

 

git remote set-url origin git@git-server-ip:xxx.git
 

git分支管理相关命令

参考网址:http://www.open-open.com/lib/view/open1328069889514.html

 

  • 列出所有分支
    • git branch
  • 建立本地Branch: 
    • git branch weibo-marketing-platform-sharding
  • 提交本地Branch到远程服务器:
    • git push origin weibo-marketing-platform-sharding:weibo-marketing-platform-sharding
  • 切换branch:
    • git checkout weibo-marketing-platform-sharding
  • 远程机器同步branch:
    • git pull
    • git checkout weibo-marketing-platform-sharding

猜你喜欢

转载自joesay.iteye.com/blog/1752328
今日推荐