DEV Community

loading...

Discussion on: I'm a Git Master, Ask Me Anything

Collapse
gonedark profile image
Jason McCreary Ask Me Anything

This really depends on your workflow. For example, if you're a solo developer, not sharing your work, you have no need to use commands like push, pull, remote.

In the end, you have to push yourself to use Git. For example, if you find yourself throwing away work or spiking out ideas, use feature branches.

Personally, I've adopted a workflow of using git add -p + git reset --hard. There's no reason I need to use these commands. I could just as easily use Cmd + Z. But I find it's faster with Git. I write all my code, add what I want with git add -p (leaving out what I don't want). I make the commit, then discard what's left with git reset --hard.

Collapse
pedrorijo91 profile image
Pedro Rijo

I would advice against "you have no need to use commands like push". The push command is your backup.. :)

Thread Thread
gonedark profile image
Jason McCreary Ask Me Anything

You misunderstood. Please read the full comment for context.