简体   繁体   中英

How to give my remote repository url in .gitconfig file

Here I am new to Git and now install bracket IDE and Git and create a new repository in GitHub and now in bracket I need to connect to remote repository for that I install brackets Git and now I can say if I give my url in .gitconfig file it will automatically connect to the repository from bracket ... so can any one tell me how to give the rule in .gitconfig file

Below is my default content in .gitconfig file

[user]
name = xyz MV
email = abc@gmail.com
[gui]
recentrepo = F:/gitclone

Now please tell me what to place in this file so that bracket can automatically connect to the remote repository.

I think you're looking for the [remote] directive.

[remote "origin"]
  url = git@github.com:user/repo.git
  fetch = ...
[remote ...]

The command git remote add origin git@github.com:user/repo.git will do this. (as nwinkler pointed out)

The easiest way of doing is through the command line:

git remote add origin https://github.com/.....

For the URL, use the one from your GitHub project page.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM