Git Commands Flashcards
Use to put files on stage
git add
Gives a status of last files were updated
git status
Use will open an editor to comment stats and details from your commit
git commit
Use to take a look at your history
git log
Takes a look in all branches created
git branch
Creates a new branch to work
git branch
Discards all updates at Working Directory and Staging Area - BE CAREFUL
git reset —hard
Commits files at stage
git commit
Cleans the file from stage to send to Repository
git reset
Adds files to a stage before send to commit
git add
Creates a git repository at directory with all files, when creates doesn’t create no snapshot
git init
Returns the COMMIT ID to life -Temporarily reset all files in a directory to their state at the time of a specific commit
git checkout
COMPARES FILES between Staging Area to Repository
git diff —staged
No Args - COMPARES FILES between Working Directory to Staging Area
git diff
To get differences between two commits, first the older
git diff