阿弥陀佛
分类: 服务器与存储
2014-01-15 14:20:50
# Add the remote, call it "upstream":
git remote add upstream
# Fetch all the branches of that remote into remote-tracking branches,
# such as upstream/master:
git fetch upstream
# Make sure that you're on your master branch:
git checkout master
# Rewrite your master branch so that any commits of yours that
# aren't already in upstream/master are replayed on top of that
# other branch:
#此时本地的master已经更新
git rebase upstream/master
#将本地的master同步到服务器端的master
git push -f origin master
git add * 向服务器端要更新的内容添加当前所有文件。
git commit -m "push all" 告诉服务器要提交哪些修改,更新所带的信息为push all。
git pull 将数据从远端数据拿过来
git push -u origin master 实现更新到远端。
在本地创建一个分支
git add -all
git commit -m '修改的信息"
git branch branch1
git push origin branch1 这样将branch1同步到github上的相应分支上去。