1. I cloned a project from the master branch to the local one.
Now I have forked a repository.
How to submit the locally modified code to the forked remote repository
instead of the first cloned one? Where is the warehouse
2. How to roll back version of remote fork warehouse
For information about synchronizing git to fork warehouse, please refer to: Git synchronizes original warehouse to fork warehouse
To return the version, you can use the following command:
or:
For details, see: Liao Xuefeng Git Tutorial: Version Rollback
Submit to remote repository:
First establish a connection between the local warehouse and the remote one, git remote add origin "the address of the remote warehouse", and then the common commands for submission: git add *; git commit -m "Add remarks"; git push origin master; That's it.
Version rollback:
First use git log to check the submitted version history and find the version number of the version you want to roll back;
Then, execute the command git reset --hard "version number"