DEV Community

Discussion on: Daily git usage

Collapse
 
bgadrian profile image
Adrian B.G.

You are using the force flag everyday, OMG I hope we will not be co-workers ...anytime ๐Ÿ˜

Collapse
 
x0st profile image
Pavel Movchan • Edited

I use the rebase feature every day many times because do not like mess in my git repositories. Of course when I work with other people i don't use the force flag.

Collapse
 
nutondev profile image
nuton.dev

It depends on the circumstances. If he is developing a branch alone and needs to correct his PR and push again for review, what would you do?

Collapse
 
bgadrian profile image
Adrian B.G.

If you want to remove the history you don't have much of a choice, it was a joke.

I would use git merge squash and instead of --force flag I would use --force-with-lease to avoid possible data loss.