Git Cheatsheet Single Page
Git Cheatsheet Single Page
Git Cheatsheet Single Page
Git is an open source version control system that works locally to help developers work
together on software projects that matter. This cheat sheet provides a quick reference to
commands that are useful for working and collaborating in a Git repository (repo).
Initializing Branching
Starting up Git within a project and getting it connected. Isolating work and managing feature development in one
place.
git init
Initializes (or starts) your current working directory (folder) as a Git git branc h
repository (repo). Lists all current branches. An asterisk ( ) will appear next to your
*
Creating files staged after modifying a file and marking it Deletes a branch.
Checks the status of your Git repo including , files added that are Downloading changes from another repository or sharing
Stages modi fied files. If you make changes that you want included Pushes or sends your local branch commits to the remote repo.
in the next commit, you can run add again. Use “git add .” for all No :te some repos use master instead of main in their commands.
Removes a file from staging while retaining changes within your branch.
working directory.
C ommitting
Recording changes made to the repo.
Sh owing Changes
git commit "Commit message"
-m See changes between commits branches and more. , ,
Commits staged files with a meaningful commit message so that