git git version rollback remote version rollback

git remote version rollback

 

This article is a blogger original, shall not be reproduced without permission:

  Before submitting in the git version and found the code will be submitted to the newly developed another branch, in order not to affect the submission of a branch code

Function, we need to roll back to previous versions.

  When using the command fallback, there has been no rollback is successful, a colleague to come and help, successfully retreated back to the previous version, and record

a bit.

  Notes found at git commit time to find the version submitted, and easy rollback.

Colleagues rollback in the git little turtle.

  Step: Project Right --- "TortoiseGit ----> Select submitted show log, as shown:

When the error log to find the right version of the submission, as shown:

 

 

Select reset the current branch to select the Log version. You can then native code back to a previous version of the error committed.

The native code is then submitted to a force command corresponding to the remote branch git repository using forced ,, filed:

git push -f

: After running as follows:

At this point edge remote git repository retreated back to the previous version

 

Added: later discovered that the same can also use the command git remote repository version rollback, the order is the same.

1. Use the git log command to view submitted commitId, use commitId local version retreated back to the previous version of the error, and then forced to submit to a remote

 2. Use the command falls back to the specified commitId

git reset --hard commitId

3. git push -f forced to submit:

 

 

This article is a blogger original, shall not be reproduced without permission:

  Before submitting in the git version and found the code will be submitted to the newly developed another branch, in order not to affect the submission of a branch code

Function, we need to roll back to previous versions.

  When using the command fallback, there has been no rollback is successful, a colleague to come and help, successfully retreated back to the previous version, and record

a bit.

  Notes found at git commit time to find the version submitted, and easy rollback.

Colleagues rollback in the git little turtle.

  Step: Project Right --- "TortoiseGit ----> Select submitted show log, as shown:

When the error log to find the right version of the submission, as shown:

 

 

Select reset the current branch to select the Log version. You can then native code back to a previous version of the error committed.

The native code is then submitted to a force command corresponding to the remote branch git repository using forced ,, filed:

git push -f

: After running as follows:

At this point edge remote git repository retreated back to the previous version

 

Added: later discovered that the same can also use the command git remote repository version rollback, the order is the same.

1. Use the git log command to view submitted commitId, use commitId local version retreated back to the previous version of the error, and then forced to submit to a remote

 2. Use the command falls back to the specified commitId

git reset --hard commitId

3. git push -f forced to submit:

 

 

Guess you like

Origin www.cnblogs.com/1124li/p/11853066.html