Created
December 31, 2010 12:35
-
-
Save yiquncode/760976 to your computer and use it in GitHub Desktop.
Git代码同步
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#线上 | |
#获取代码 | |
git clone ... | |
#获取更新 | |
git pull | |
#如果在线上修改了代码,要推回 | |
git push | |
#线上代码和git版本库冲突 | |
#Your local changes to ... would be overwritten by merge | |
git fetch --all | |
git reset --hard origin/master | |
#开发环境 | |
#如果要同步线上修改的代码 | |
git pull | |
#此时应该会提示错误 | |
git config branch.master.remote origin | |
git config branch.master.merge refs/heads/master | |
#批量删除和提交 | |
git commit -a -m 'this is memo' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
git Sync是干嘛用的啊?