git - Setting up BitBucket so you can use pull from it on your server -


i have setup repository , have working locally can push/pull bitbucket; trying working can git pull host server.

i have setup ssh key , , well, when do:

cat .git/config 

all is:

[core]         repositoryformatversion = 0         filemode = true         bare = false         logallrefupdates = true 

whilst config file on local environment contains:

[core]     repositoryformatversion = 0     filemode = false     bare = false     logallrefupdates = true     symlinks = false     ignorecase = true     hidedotfiles = dotgitonly [remote "origin"]     url = git@bitbucket.org:git-username/my-repo.git     fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"]     remote = origin     merge = refs/heads/master [gui]     wmstate = normal     geometry = 887x427+25+25 171 192 

so not sure why different? assume need add remote origin unsure how go it? assume follow same instructions when setting repository via bitbucket i'm not sure if all? ....and can't seem find information again once repo has been created.

ok, below need able pull server bitbucket repo:

  1. it recommended add deployment key per lester vargas's answer.
  2. from command line run git remote add origin git@bitbucket.org:bb-username/repo-name.git

now, section [branch "master"] automatically pulls master branch repo can below on command line:

  1. git config branch.master.remote origin
  2. git config branch.master.merge refs/heads/master

that should it!


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -