Important Git Operations 1699463224
Important Git Operations 1699463224
● git rm [file] - Delete the file from the project and stage the
removal for commit.
● git mv [existing-path] [new-path] - Change an existing file path
and stage the move.
● git log --stat -M - Show all commit logs with indication of any
paths that moved.
Rewriting History
Temporary Commits
Advanced Features
Collaborating
Tagging
Git Configurations
Git Hooks
Git Attributes
Submodules
Advanced Merging
Patching
Searching
Rebasing
Advanced Inspection
Advanced Branching
● git branch --merged - List branches that have been merged into the
current branch.
● git branch --no-merged - List branches that have not been merged.
● git branch --track [branch] [remote-branch] - Set up a local branch
that tracks a remote branch.
● git branch -vv - List all branches with their upstream branches.
● .gitignore - The file where you define which files and patterns
should be ignored by Git.
● git check-ignore [path] - Check which .gitignore file line matches
a given path.
● git check-ignore -v [path] - Show verbose output of check-ignore.
Workflows
Reflog
Housekeeping
Archive
Advanced Git
Server-Side Git
Git Internals
● git config --list - List all variables set in config file, along
with their values.
● git config [key] - Get the value of a configuration entry.
Patch Management
Bundling
Debugging
● git bisect - Use binary search to find the commit that introduced a
bug.
● git blame -L [line-range] [file] - Show what revision and author
last modified each line of a file, within a given line range.
Plumbing Commands