git push origin not working

kostik_noir August 6, 2013

Hi.

Basically I have same difficulty like at

https://answers.atlassian.com/questions/67729/git-push-origin-not-working

I commit, push but I not see updates at Bitbucket.

My repository is private and only 2 BitBucket accounts have access there:
*) me - owner

*) other account in read-only mode

Thanks in advance.

Best regards, Konstantin

3 answers

1 accepted

0 votes
Answer accepted
m
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 6, 2013

Konstantin,

You don't say what kind of response your client returns you when you push. Is the push failing or does it appear to succeed? It is a good idea to paste the response here.

Your first step is to see which remote your configuration is set to push to. You can do this with this command:

git remote origin

If you are on HG, you can list the contents of .hg/hgrc in your local repo to see the remotes.

kostik_noir August 7, 2013

By the way - I can't to delete my "answer"

kostik_noir August 7, 2013

Hi. Thanks for the quick reply.

>You don't say what kind of response your client returns you when you push.
To be consistent:
Win 8 x64
client: msysgit

client response:
$ git push origin master
Everything up-to-date

It was not the first push to this repository and before that everything was fine.

$ git log
I see my last commits but I have not seen same commits at BitBucket

After
$ git checkout master
I lost all updates which I made before but, fortunately, I made backup of files.

So now I restored last state of files in repository (but without history).
And now I'm more interested why this occurred.

m
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 7, 2013

Konstantin,

So, it appears you made some changes but did not add them to the staging area. So, the process is this:

  1. Add or edit a file in your repository.
  2. Stage the file with this command:
    git add myfile.txt
  3. Repeat until are your changes are made.
  4. Commit all changes in staging with this command:
    git commit -m "message"
  5. Push your changes:
    git push origin master

kostik_noir August 12, 2013

>git add myfile.txt

>git commit -m "message"

>git push origin master

Yes, I know about this sequence.

And as I wrote

> $ git log
> I see my last commits but I have not seen same commits at BitBucket

0 votes
kostik_noir August 13, 2013

Closed

0 votes
kostik_noir August 7, 2013

Hi. Thanks for the quick reply.

>You don't say what kind of response your client returns you when you push.
To be consistent:
Win 8 x64
client: msysgit

client response:
$ git push origin master
Everything up-to-date

It was not the first push to this repository and before that everything was fine.

$ git log
I see my last commits but I have not seen same commits at BitBucket

After
$ git checkout master
I lost all updates which I made before but, fortunately, I made backup of files.

So now I restored last state of files in repository (but without history).
And now I'm more interested why this occurred.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events