Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git rewrite commit message

# for the most recent commit
git commit --amend -m "changed commits"
git push -f
# for n older commits
git rebase -i HEAD~n
# follow instuctions e.g. use r for reword to edit older commits
# removing a line means THAT COMMIT WILL BE LOST. 
git rebase --continue
# solve conflicts if exist
git push -f
# git push --force-with-lease origin <branch> is safer
Comment

PREVIOUS NEXT
Code Example
Shell :: kubectl get namespace 
Shell :: git sync branch with master 
Shell :: date fns install 
Shell :: crontab command not found 
Shell :: powershell http request 
Shell :: bash float operation 
Shell :: install angular app 
Shell :: git merge strategies 
Shell :: how to stop tomcat server in macos 
Shell :: gitlab change commit message 
Shell :: count the numbers of directories in a specific directory 
Shell :: bash read file line by line 
Shell :: bash how to remove the first n lines of a file 
Shell :: add local folder to git repo 
Shell :: pytorch conda environment 
Shell :: Create Local Github Repo 
Shell :: Unable to find a valid SQLite command 
Shell :: starting apache2 server 
Shell :: updating vscode on ubuntu 
Shell :: linux signals 
Shell :: how to setup dockers on aws 
Shell :: install bootstrap in gatsbyjs 
Shell :: Forgot the password I entered during postgres installation 
Shell :: default pem file permissions 
Shell :: dollar to pkr 
Shell :: install virtualbox on ubuntu 
Shell :: yarn install netlify 
Shell :: windows 10 install wsl2 
Shell :: bash "set -e" 
Shell :: ubuntu check chmod 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =