Categories
GIT

Useful GIT commands

Check the status of the repo

git status

List all the settings of the repository

git config --list

Set global (or local) account variables

git config --global user.name "Firstname Lastname"
git config --global user.email "your_email@youremail.com"

Change the URI (URL) for a remote Git repository

git remote set-url origin git://new.url.here

Force Git to overwrite local files on pull

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

Delete untracked files

git clean -fd

Leave a comment

Design a site like this with WordPress.com
Get started