Difference between revisions of "My git notes"

From Got Opinion Wiki
Jump to navigation Jump to search
 
Line 1: Line 1:
== 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 <code>git init</code>
Creates .git directory in root directory.
=== Git commands ===
$ git status
$ git add <files> (use . for everything)
== ssh agent ==
steps after SSH keys exist in <code>$ ls -la ~/.ssh</code>
$ eval $(ssh-agent -s) < - - Windows
$ eval "$(ssh-agent -s)" < - - Linux
$ ssh-add ~/.ssh/id_rsa
== Resources ==
== Resources ==



Latest revision as of 14:49, 5 July 2019

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

Resources

Use gitignore.io to create useful .gitignore files for your project

To Computing