Skip to content

About

Git Commands and Scripts

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Git Reference

http://gitref.org/


My quick reference

update/add a file

touch myfile.txt

// edit and save the file
git status
git add myfile.txt
git status
git commit -m "update"
git push -u  origin master

pull changes


git pull

if there is any conflict, we need to manually merge it and commit first

then update any further changes, then commit second time

finally push the 2 commits

discard changes

git checkout -f -- "filename"  // to discard unstaged changes. note, there is a space between -- and "filename".
git checkout -f
git reset --hard origin/master // to discard local commits

git overwrite local changes and checkout

git reset --hard HEAD
git clean -fd
git status
git pull <alias> master

Github For Windows

Recently github has released an exe to manage git with ease - see details at http://windows.github.com/

About

Git Commands and Scripts

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors