Remote repository

Adding a remote repository

Syntax
$ git remote add [repositoryname] [repositoryURL]
example
$ git remote add ajeshRepository https://aj3sh@bitbucket.org/aj3sh/myrepository.git

Commands with the remote repository are
$ git push [repositoryname] master    #master is default branch
#eg $ git push ajeshRepository master
$ git fetch [repositoryname]    
# eg $ git fetch ajeshRepository
$ git merge [repositoryname]/master    
#eg $ git merge ajeshRepository/master
$ git pull [repositoryname] master   
#eg $ git pull ajeshRepository master

Viewing all remote repository

$ git remote -v
ajeshRepository https://aj3sh@bitbucket.org/aj3sh/myrepository.git (fetch)
ajeshRepository https://aj3sh@bitbucket.org/aj3sh/myrepository.git (push)

Deleting remote repository

$ git remote remove ajeshRepository

You must login to comment

No comment yet


  • Online: 19
    Registered users: 7
    Unique visitors: 2461
    Total hits: 12161