Difference between revisions of "My git notes"

From Got Opinion Wiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
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 ==


Use [https://www.gitignore.io/ gitignore.io] to create useful .gitignore files for your project
Use [https://www.gitignore.io/ gitignore.io] to create useful .gitignore files for your project


<center>[[Programming|To Programming]]</center>
<center>[[Computing|To Computing]]</center>

Latest revision as of 15: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