Difference between revisions of "Git reference"

From thelinuxwiki
Jump to: navigation, search
Line 31: Line 31:
 
convenient way to modify the most recent commit log   
 
convenient way to modify the most recent commit log   
 
   git commit --amend
 
   git commit --amend
 +
 +
==remote repos==
 +
 +
list remote repos
 +
$ '''git remote -v'''
 +
origin  pronger@192.168.167.5:/home/pronger/.password-store (fetch)
 +
origin  pronger@192.168.167.5:/home/pronger/.password-store (push)
 +
 +
delete remote repo
 +
$ '''git remote remove origin'''
 +
 +
 +
== links ==
 +
 +
[http://sixrevisions.com/web-development/introductory-guide-to-git-version-control-system/ beginner guide]
 +
 +
[http://jonas.nitro.dk/git/quick-reference.html GIT cheatsheet]
 +
 +
[http://git-scm.com/book pro git book]
 +
 +
  
 
== links ==
 
== links ==

Revision as of 22:07, 25 June 2020

git - distributed revision control system

create repositories by creating a directory for each project. Once you are in the directory,

# git init

Adding Files to the Repository

git add *

or

git add filename.txt

Committing Files The Git add command is normally followed immediately by the Git commit command.

committing creates a snapshot

git commit -a -m "This is my commit message!"

list files to be added by a commit

git status

list commit history for current branch

git log
git branch 
git checkout

ignore file git thinks is changed

 git update-index --assume-unchanged <file|directory>

convenient way to modify the most recent commit log

 git commit --amend

remote repos

list remote repos

$ git remote -v
origin  pronger@192.168.167.5:/home/pronger/.password-store (fetch)
origin  pronger@192.168.167.5:/home/pronger/.password-store (push)

delete remote repo

$ git remote remove origin


links

beginner guide

GIT cheatsheet

pro git book


links

beginner guide

GIT cheatsheet

pro git book