DEV Community

Getting started with Git? 10 commands that would save you…

Jessica Iwu on November 22, 2017

Pushing, Pulling, fixing Merge issues among many others, used to be insurmountable problems for me because I was not familiar with git. I was alway...
Collapse
 
katzy687 profile image
Natti Katz

these are good base commands to learn

you'll want to learn about git reset or git revert when something goes wrong.

also "git checkout ." is one I use occasionally when something new I'm trying just goes to shit

Collapse
 
belhassen07 profile image
Belhassen Chelbi

I added this post page to my favorites

Collapse
 
devansvd profile image
Devan

Well, git fetch, git stash ??

Collapse
 
isaacleimgruber profile image
IsaacLeimgruber

Agreed, git stash is an absolute must have when you have irrelevant changes that force you to merge having no cvs integrated in IDE.

Collapse
 
vinopravin profile image
Pravinraj Mohan

git merge???

Collapse
 
jessicaiwu profile image
Jessica Iwu

git merge is really cool too..

Collapse
 
avallete profile image
avallete

git rebase -i HEAD HEAD~X

For rewriting some history before pushing is a must have for me.

Collapse
 
isaacleimgruber profile image
IsaacLeimgruber

I personally never use git init. Is it wrong? I always initialise a repo from github with a readme then clone

Collapse
 
devansvd profile image
Devan

In some cases especially when you work offline.