Git Cheat Sheet

Git is a version control system that helps people to contribute and track changes on the project. Here are some basics Git commands to get you started with Git.

Git TaskNotesGit Commands
Git ConfigurationReturns a list of information about git configuration including name and email.git config -1
Set up Git UsernameConfigure the author name and email address to be used with your commits.1.git config --global user.name"Sam Smith" 2. git config --global user.email sam@example.com
Initializing a New RepositoryCreates a new local repositorygit init
Adding FilesAdd one or more files to the staging area.git add filename or git add .
StatusStatus of the repositorygit status
CommitCommit the changesgit commit -m "Commit message"
Commit HistoryShows the commit history of the repositorygit log -oneline
Connect to remote repositoryAdds a remote repository to a local one.git remote add origin https://repo_here
PushPushing all changes to the remote repositorygit push origin master

These are some of the basic commands to get you started with GIT. Book marks this page for future reference. Thanks for reading.