Removes a local branch.
git branch -d branch_name
git branch -D branch_name
Pushes a local branch to the remote repository.
git push -u origin BRANCH
Removes a branch from the remote repository.
git branch -d <branch_name>
Discards all local changes and resets the working directory to the last committed state.
git reset --hard HEAD
Removes cached files from the repository and updates the index according to .gitignore
.
git rm -r --cached .
git add .
git commit -m “remove ignored files”
Clones a specific branch from a remote repository.
git clone -b [email protected]:path/path.git
Displays or sets the URL for a remote repository.
git remote set-url origin [email protected]:path/path.git
Combines changes from one branch into another.
git checkout master
git pull origin master
git merge test
git push origin master