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:
- it recommended add deployment key per lester vargas's answer.
- 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:
git config branch.master.remote origingit config branch.master.merge refs/heads/master
that should it!
Comments
Post a Comment