Git remote warehouse problem (commit. rollback)
習慣沉默
習慣沉默 2017-05-02 09:41:07
0
2
777

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

習慣沉默
習慣沉默

reply all(2)
曾经蜡笔没有小新
  1. For information about synchronizing git to fork warehouse, please refer to: Git synchronizes original warehouse to fork warehouse

  2. To return the version, you can use the following command:

git reset --hard HEAD~3#3指的是退回到最近的第几次提交,是倒数的

or:

git reset --hard 对于版本的哈希值

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"

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template