Friday 29 March 2019

More about Git

Stash is disabled by default when you want to stash a new file in Source Tree

Stach unchecked/new files:
git stash --include-untracked


Find the lost commit
git reflog (find the sha of the lost commit)
git reset --hard <sha> (set the current branch HEAD to that commit )




How to  modify committed  comments?

If starting like this and we want to modify the comments of the latest commit "File02" to "Added file02"

Right click on the previous commit and choose 'Rebase children of ......'


Then in the window pops click "Message" at the left bottom and save the changes. Now the comments history will look as below:


No comments:

Post a Comment