![]() ![]() Now the the most important part.Follow along. You will get a message saying HEAD is detached, dont worry about this.Git is just complaining because we have checkout out a random commit which it has no control to increment HEAD.Īs mentioned above,when notepad prompts dont change this files.Click No.Save the file. Turn off this advice by setting config variable tachedHead to false If you want to create a new branch to retain commits you create, you mayĭo so (now or later) by using -c with the switch command. State without impacting any branches by switching back to a branch. You can look around, make experimentalĬhanges and commit them, and you can discard any commits you make in this Change the two pick options from the top to squash options before closing the text editor. Note: switching to '315373283dcbe1c7561e93a32969fbab0943ad37'. Git opens an editor, where we can handle git squash commits. When notepad++ prompts to overwrite(as the checkout is forcing it do) just select NO.This will keep the changed files in ‘M’ modified state.Just hit save in all this modified files( all modified files will come with red sign in notepad++) So in this we have to checkout the target commit(315373) without allowing to overwrite changes from the latest commit(5e39e62).To do this open your project in notepad++ as a workspace and then do a checkout. In this case we are going to squash eight,ninth,tenth commit together into 1 on top of commit hash 31537 (this is our target) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |