Git For Data Science
Git For Data Science
BASICS: -
Cont..
UNDO CHANGES: -
git reset <file> Remove <file> from the staging area, but
leave the working directory unchanged.
This unstages a file without overwriting
any changes.
Cont..
GIT BRANCHES: -
REMOTE REPOSITORIES: -
Cont...
GIT CONFIG: -
git config --global user.name <name> Define the author name to be used for all
commits by the current user.
git config --global user.email <email> Define the author email to be used for all
commits by the current user.
git config --system core.editor <editor> Set text editor used by commands for all
users on the machine. <editor> arg
should be the command that launches
the desired editor (e.g., vi)
GIT RESET: -
git reset --hard <commit> Same as previous, but resets both the
staging area & working directory to
match. Deletes uncommitted changes,
and all commits after <commit>
GIT PULL: -
GIT PUSH: -
git push <remote> --force Forces the git push even if it results in a
non-fast-forward merge. Do not use the -
-force flag unless you’re absolutely sure
you know what you’re doing.
git push <remote> --all Push all of your local branches to the
specified remote.
GIT LOG: -
git log --stat Include which files were altered and the
relative number of lines that were added
or deleted from each of them.
You have reached the end of the GIT Commands Cheat Sheet tutorial.
Happy Learning,
Manohar Srigiriraju
THE END