ITeye博客

Git常用命令与配置

joesay · 2012-12-22 12:38 · 项目管理 · Git · 开源软件 · Markdown

git服务器搭建相关命令

 

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

参考网址2:http://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

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。