My git notes

From Got Opinion Wiki
Jump to navigation Jump to search

Git basics

Version control with Git

  • untracked files : Git does not track
  • unstaged changes : Git tracks and changes have been made since last commit
  • staged changes : Git tracks and changes are ready to commit
  • commits : committed changes

initialize Git

From project's root directory git init

Creates .git directory in root directory.

Git commands

$ git status

$ git add <files> (use . for everything)

ssh agent

steps after SSH keys exist in $ ls -la ~/.ssh

$ eval $(ssh-agent -s) < - - Windows

$ eval "$(ssh-agent -s)" < - - Linux

$ ssh-add ~/.ssh/id_rsa


Use to create useful .gitignore files for your project

To Computing