DEV Community

Discussion on: What are your WORST git fails?

Collapse
 
zyabxwcd profile image
Akash • Edited
  • I used to forget taking a pull from the remote before starting out to work on a feature which led to more chances of a merge conflict happening later on.
  • I struggled with rebasing while squashing commits. I still dont prefer rebasing. I did something I still dont understand which led to repeated commits in the same branch and then I altogether left that branch to die and later deleted it.
  • I have mistakenly tried to push directly to main branch but thankfully when working in a live project, it was setup in a way that it didn't allow me to do that. :)
  • I started working on a different feature in a branch that was for a different feature and committed the code in that branch.
  • And yes I have once pushed API keys that were exposed in the code to git.
Collapse
 
nombrekeff profile image
Keff

I have mistakenly tried to push directly to main branch but thankfully when working in a live project, it was setup in a way that it didn't allow me to do that. :)

Yeah that's a really nice thing to have, we have rules on our repos for this reason

It's saved us quite a few times