Git Commands git clone, delete branch and delete repository

How to clone using git

Using git clone you can make a copy of repo or clone it in a new directory in your local system. Using git clone you can located the original repository on the local system

git clone <URL>
git clone https://github.com/blogshub4/How-to-login-in-Laravel-using-Facebook-account.git

How to cut or create new branch

git branch -b branchname

How to delete a Git branch locally and remotely

Locally

git branch -d <branch_name>
git branch -d branchname

Remotely

git push origin --delete <branch_name>
git push origin --delete branchname

How to delete a Git repository locally and remotely

Locally

remove .git folder or run rm .git command

Remotelly

  1. First login in git hub
  2. Select the repository which you want to delete

3 Select “Setting” tab on top

4 Go down and select “Delete this repository”

5. Enter confirmation text in textbox and click on below button

6 Done, got success message

Leave a Reply

Your email address will not be published. Required fields are marked *