โ # Command Line Definitions
cd - change directory/folder
ls - list directory contents/shows everything inside current folder
ls -a - shows visible and hidden files/directories
man - displays manual for given command
mkdir - make directory with given name (folder)
pwd - print working directory/shows you where you currently are
touch - create file with given name
cd .. - move up one directory
git init - initialize an empty repository/makes a directory a repository by putting a .git folder into it
git add - moves a modified file to the staging area
git commit -m "<message" -moves staged files to the Git Directory and labels the commit with a message for other developers
git config --global user.name - changes or sets your global username
git config --global user.email - change or set global email address
git config --global --list - displays your global settings
git config --global core.editor - set your global editor
git commit --amend -m "" - changes the commit message of the last commit to the new message
git commit --amend - if you forgot to add a file or you have a misspelling in your commit message.
Overwrites the previous commit with new files and message.
git reset HEAD - moves the staged file from the Staging Area to the Working Directory
git checkout -- - removes any changes made to the file and reverts it's status back to unmodified
git branch - create a new branch with the given name
git checkout - switch to a new branch
git checkout -b - create new branch and switch to it
git branch -d - delete existing branch with given name
git branch - shows all current branches and what branch you're currently on
git merge - merges the histories of two branches into a single branch
- checkout the branch you want to merge changes into.
- git merge branch you want to merge into current branch