Skip to main content
Add Bash syntax highlighting
Source Link
Benjamin Loison
  • 5.8k
  • 4
  • 20
  • 37

You won't face any terrible consequence, just the history will look kind of confusing.

You could change the commit message by doing

git commit --amend git push --force-with-lease # (as opposed to --force, it doesn't overwrite others' work) 
git commit --amend git push --force-with-lease # (as opposed to --force, it doesn't overwrite others' work) 

BUT this will override the remote history with yours, meaning that if anybody pulled that repo in the meanwhile, this person is going to be very mad at you...

Just do it if you are the only person accessing the repo.

You won't face any terrible consequence, just the history will look kind of confusing.

You could change the commit message by doing

git commit --amend git push --force-with-lease # (as opposed to --force, it doesn't overwrite others' work) 

BUT this will override the remote history with yours, meaning that if anybody pulled that repo in the meanwhile, this person is going to be very mad at you...

Just do it if you are the only person accessing the repo.

You won't face any terrible consequence, just the history will look kind of confusing.

You could change the commit message by doing

git commit --amend git push --force-with-lease # (as opposed to --force, it doesn't overwrite others' work) 

BUT this will override the remote history with yours, meaning that if anybody pulled that repo in the meanwhile, this person is going to be very mad at you...

Just do it if you are the only person accessing the repo.

added 77 characters in body
Source Link
Gabriele Petronella
  • 108.5k
  • 21
  • 223
  • 238

You won't face any terrible consequence, just the history will look kind of confusing.

You could change the commit message by doing

git commit --amend git push -f-force-with-lease # (as opposed to --force, it doesn't overwrite others' work) 

BUT this will override the remote history with yours, meaning that if anybody pulled that repo in the meanwhile, this person is going to be very mad at you...

Just do it if you are the only person accessing the repo.

You won't face any terrible consequence, just the history will look kind of confusing.

You could change the commit message by doing

git commit --amend git push -f 

BUT this will override the remote history with yours, meaning that if anybody pulled that repo in the meanwhile, this person is going to be very mad at you...

Just do it if you are the only person accessing the repo.

You won't face any terrible consequence, just the history will look kind of confusing.

You could change the commit message by doing

git commit --amend git push --force-with-lease # (as opposed to --force, it doesn't overwrite others' work) 

BUT this will override the remote history with yours, meaning that if anybody pulled that repo in the meanwhile, this person is going to be very mad at you...

Just do it if you are the only person accessing the repo.

Source Link
Gabriele Petronella
  • 108.5k
  • 21
  • 223
  • 238

You won't face any terrible consequence, just the history will look kind of confusing.

You could change the commit message by doing

git commit --amend git push -f 

BUT this will override the remote history with yours, meaning that if anybody pulled that repo in the meanwhile, this person is going to be very mad at you...

Just do it if you are the only person accessing the repo.