Configuring a remote for a fork

Syncing a fork
git remote -v
git remote add upstream url/for/upstream/git
git remote -v
git fetch upstream
git config user.name "username" ====> for local project ***项目的根目录,与.git同个目录
git config --global user.name "username" ====> for global
local branch sync with upstream master
local terminal: git fetch upstream master
git push origin master
网友评论