DEV Community

Discussion on: Git hacks you should know about

Collapse
 
detunized profile image
Dmitry Yakimenko

What is very important, that these commands rewrite history. And when you rewrite history, you actually create new commits and the old ones stay intact. So if you've pushed already, then after using any of these commands you won't be able to push without --force. And once something is shared it cannot be unshared. Be careful and know what these commands lead to.

I wouldn't call these hacks or tricks, though. Most of these is a regular workflow stuff.

Collapse
 
capsule profile image
Thibaut Allender

But "hacks" sells more than "commands".