在使用git fork了其他人的项目后,这个项目就会在自己的git空间复制出来,这时如果人家的版本更新了怎么办?

git clone

cd eova
git remote add eova-master
git fetch eova-master
git pull eova-master master

git fetch origin master:tmp
git diff tmp 
git merge tmp



git branch new-branch
git checkout new-branch
git checkout -b new-branch

git fetch
git checkout -b local-branch origin/remote-branch
git push origin local-branch:remote-branch

git push remote local-branch:remote-branch

git push -u origin remote-branch

git branch -a
git branch -d alpha-1


git log            #查看提交记录
git commit --amend #修改上一次提交日志
git show commit-id


git rebase -i HEAF~6
# '-i'或'--interactive'参数调用交互模式


  1 pick f50ebb6 added a secondary datasource, *** THIS MAY AFFECT PROD ENV ***,     and added multi-production category service
  2 pick 2bed616 updated dmp category response
  3 pick 879693f added category filter
  4 pick 284c5a6 added another category detail api for multi-product business
  5 pick 0121db1 fixed a bug where category names is not correct in category det    ail api
  6 pick 24ccf25 NEG-2529: (lihaifeng) updated category detail api
  8 # Rebase 4c79356..24ccf25 onto 4c79356 (6 commands)
  9 #
 10 # Commands:
 11 # p, pick = use commit
 12 # r, reword = use commit, but edit the commit message
 13 # e, edit = use commit, but stop for amending
 14 # s, squash = use commit, but meld into previous commit
 15 # f, fixup = like "squash", but discard this commit's log message
 16 # x, exec = run command (the rest of the line) using shell
 17 # d, drop = remove commit


git checkout src/main/java/
git checkout .
git clean -xdf
git reset --hard                    #撤销commit

git reset <commit-id> --hard
git cherry-pick <some-commit-id>


git init
git remote -v
git remote add osc
git pull osc master --allow-unrelated-histories
git push osc master


git checkout master
git pull
git checkout -b release_xx
git tag release_20180801
git push origin release_xx
git push --tags