git - two common operations

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wangbingfengf98/article/details/89167214

Clean up a fork and restart it from the upstream

git remote add upstream /url/to/original/repo
git fetch upstream
git checkout master
git reset --hard upstream/master  
git push origin master --force 

view one's log commit

$ git log --author=wangbingfeng

references:

1. https://stackoverflow.com/questions/9646167/clean-up-a-fork-and-restart-it-from-the-upstream/39628366

2. https://git-scm.com/docs/git-log

猜你喜欢

转载自blog.csdn.net/wangbingfengf98/article/details/89167214
two