Help! I’m randomly typing git commands into the terminal.
Ok Ok…lets chill and take a systematic approach to this.
pwd
print working directory
ls -a
lists all files and folders in this directory. -a
sands for all (to display hidden folders too).
You should see a folder called .git
. If you don’t, you may need to
git branch
will show you which branch you’re ongit log
will show your your commit log in that branch.You can use the ↑ and ↓ arrows to look through your commit log.
Press q to quit.
git status
will show you your staging area
Read all the output messages thoroughly.
Take a few breaths and make a mental picture of what’s going on.
Tell yourself what needs to be done next before typing any commands: