- Published on
Git Basic Commands
- Authors
Remove a remote
1) First check the name of your remotes
$ git remote -v
2) Remove by the name
$ git remote rm <REMOTE_NAME>
3) Example
$ git remote -v
> origin https://github.com/OWNER/REPOSITORY.git (fetch)
> origin https://github.com/OWNER/REPOSITORY.git (push)
> destination https://github.com/FORKER/REPOSITORY.git (fetch)
> destination https://github.com/FORKER/REPOSITORY.git (push)
$ git remote rm destination
$ git remote -v
> origin https://github.com/OWNER/REPOSITORY.git (fetch)
> origin https://github.com/OWNER/REPOSITORY.git (push)
Merge a branch with master
Let we have a brach with name "develop"
1) Go to develop branch and Commit the changes:
$ git checkout develop
$ git add –A
$ git commit –m "Some changes on navbar"
2) Go to master branch and merge
$ git checkout master
$ git merge develop
Github Starter
create a new repository on the command line
echo "# modabbersam" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/OWNER/REPOSITORY.git
git push -u origin master
OR push an existing repository from the command line
git remote add origin https://github.com/OWNER/REPOSITORY.git
git push -u origin master