Force Git push local files to a Fork

Execute the following command locally (uncomment the #)

git init # Create repository in local folder
git remote add origin [email protected]:vkgo/TreeDecoder.git # Add remote repository source
git add *
git commit -m 'update'
git push -f --set-upstream origin master 
# "-f" means force push, because the source code of the fork is different from our local source code; "master" is the branch name.

2 Replies to “Force Git push local files to a Fork”

  1. I would like to show my respect for your kind-heartedness supporting men and women who need help with that concept. Your very own commitment to getting the solution all over appears to be rather effective and have in most cases empowered women just like me to reach their endeavors. Your personal interesting tips and hints means a whole lot to me and substantially more to my office colleagues. Thanks a lot; from all of us.

发表回复