![]() ![]() (one revert commit, one forward commit) - or you can also revert all your local changes and last revert commit using: git reset -hard HEAD~1Äeletes local changes and last commit completely (from git history and from file system, WARNING: change cannot be recovered) Useful if you managed to understand what went wrong and how to fix current version, and want to return one commit back. There are two common ways to move the changes from the central repo to a remote repo, like the live server: git merge and git pull. ![]() If you decide to commit your change later on, you will end up with two commits instead of one. Useful to start problem solving over again, with previous commit change as "working draft". So useful Locally, I do git fetch /anotherbuilddir/ & git cherry-pick QbProg.Revert change back to old version and pick up commit changes to local files, so you can continue from same point as previously. this should be the answer to be found everywhere to cherry-pick without having to add a remote. Reverts particular change, and commits change to git (but does not push it to server) - in case if you want to return to old version to understand what was done wrong. Reverts particular change, but keeps commit changes locally - useful if you don't want to revert everything, but just something (This is also behavior of Tortoise Git). In Git, cherry-picking is taking a single commit from one branch and adding it as the latest commit on another branch. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |