WebFaction
Community site: login faq

Hi all,

Please note, I'm a newbie to gitweb.

I have repeatedly gone over the documentation at http://docs.webfaction.com/software/git.html. The web interface seems to be working as expected. I've created a repository and enabled HTTP Push and postBuffer. I've set up my project in a local repo, but everytime I attempt to push to the gitweb repo, the outcome is:

tone@starbox: ~/pubb_js$ git push http://ibrokeit@git.pubbin.com/pubfinder.git
Password:
Everything up-to-date

...but there is nothing in the remote repo.

I figure if I were doing something really wrong, git would yell at me, but this looks like something is breaking somewhere and I'm not sure where to find it. Any suggestions?

asked 20 Jul '11, 21:29

Tony
1111
accept rate: 0%


Does a remote branch exist, and is the local branch tracking it? If not, you will want to specify to a branch, using something like:

git push http://ibrokeit@git.pubbin.com/pubfinder.git master

If "master" didn't exist already, then this creates the branch and should set up a "tracking branch" which means you can then push without specifying "master" next time.

Also, for convenience, you can name "http://ibrokeit@git.pubbin.com/pubfinder.git" as a Remote; let's call it origin:

git remote add origin http://ibrokeit@git.pubbin.com/pubfinder.git

Then: git push origin master (use git remote -v to see your remotes).

If you have the option, it's often even more preferable to clone down the empty repository, add some files, and then push back:

git clone http://ibrokeit@git.pubbin.com/pubfinder.git
cd pubfinder
(create some files)
git add .
git commit -m 'initial commit'
git push origin master

In the future, we could just use git push; the "origin" remote and "master" branch would be inferred based on the tracking branch relationships.

Lastly, a common technique for a repository that already exists locally is to:

  1. use git push http://ibrokeit@git.pubbin.com/pubfinder.git master to push the local repository up to webfaction.
  2. use git clone http://ibrokeit@git.pubbin.com/pubfinder.git to clone down the new repository, with tracking branches ready. This will be used instead of the original local one from now on.
  3. Push new changes with just git push

Hope that helps!

permanent link
This answer is marked "community wiki".

answered 20 Jul '11, 21:41

ryans ♦♦
5.0k93460
accept rate: 43%

edited 20 Jul '11, 21:46

Awesomeness! Adding the branch did it!

Thanks so much!

(20 Jul '11, 21:51) Tony
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×111
×28

question asked: 20 Jul '11, 21:29

question was seen: 35,604 times

last updated: 20 Jul '11, 21:51

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM