Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

Removing last commit locally or remotely

// after adding a file mistakenly to commit
// git log to see how many times you have committed the changes so as to know how many times 
// you would reset the commit
git log
// after getting how many times you would reset for example 5 times, then run below code 5 times
git reset HEAD~1
// then proceed to add again
git add .
Source by ncona.com #
 
PREVIOUS NEXT
Tagged: #Removing #commit #locally #remotely
ADD COMMENT
Topic
Name
7+5 =