Basic Git Commands
- git init - Creates a git repository in the folder you are currently in.
- git add filename - Adds files to the repository.
- git add . - Adds all file changes to the repository.
- git commit -m "name of commit" - Commits the added files to a save point in the repository.
- git status - Shows the status if the current working files, added files, and commit.
- git log - Displays log of commits in the current branch.
Advanced Git Commands
- git checkout name - Used to change branches or go into old commits.
- git remote add origin https://github.com/username/project.git - Connects the local git repository with a profile and git on github.com.
- git push -u origin master - First upload of local repository to github.
- git branch name commit# - Gives a name to the new branch referencing the commit alpha-numeric name.
About Git
Back to WEB182