Git Cheatsheet
Git Cheatsheet
www.linkedin.com/in/varunkumar5/
git config --global Define author name to be used for all commits by git revert <commit- Create a new commit that undoes the changes from
user.name <name> the current user id> a specified commit.
git config --global Define the author email to be used for all git commit --amend Modify and add changes to the most recent commit.
user.email <email> commits by the current user.
Display all configuration settings for git on the git reset --hard Reset your branch to a previous commit,
git config --list
machine. <commit-id> discarding changes after the specified commit.
Add changes in the specified file or directory to Apply previously stashed changes to the working
git add <file-name> git stash apply
the staging area. directory.
git commit -m Commit changes in the staging area with a
git clean -f Remove untracked files from the working
<message> descriptive message. directory.
Show modified files in the working directory, git rebase -i Reapply commits on top of another base tip, often
git status
staged for your next commit. used to modify commit history.
<commit-id>