HPC - Universidad de Sevilla

Some Git commands

Checkout this repository

cd <workspace>  
git clone

Add file to index

git add <filename>


git mv <old name> <new name>

Commit to head

git commit -m "new file"

Undo changes, get latest local head version

git checkout -- <filename>

Upload to repository

git push origin master

Update/merge from repository

git pull

Drop all local changes and get again from server

git fetch origin
git reset --hard origin/master