Tag : git-2

Git -basics

Initializing a Repository in an Existing Directory:


$ git init

Use git add commands that specify the files you want to track, followed by a commit:


$ git add *.php
$ git add FILENAME
$ git commit -m 'initial commit'

Cloning an Existing Repository:


$ git clone git://github.com/schacon/grit.git

Git – Force an overwrite of files on a git pull

Use this commands to force an overwrite of files on a git pull:


git fetch --all
git reset --hard origin/master