🌿Git

Initialisation/Starting

Init a repository

git init

Adding a Git remote

# add using ssh
git remote add origin [email protected]:path/to/repo.git

# add using https
git remote add origin https://github.com/paht/to/repo.git

Change URL of Git remote

git remote set-url origin [email protected]:/path/to/repo.git

Clone a repository

# this will clone into a new directory named 'repo'
git clone github.com/path/to/repo.git

# this will clone into the current directory
git clone github.com/path/to/repo.git .

Development

Adding an item to the Git repository

Remove an item from the Git cache

Creating a new branch

Rebasing from master

Squashing commits

Release

Listing all Git tags

Adding Git tag to current commit

Last updated

Was this helpful?