Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7196859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:51:29+00:00 2026-05-28T20:51:29+00:00

I use SVN for a while now. But I just use checkout, update and

  • 0

I use SVN for a while now. But I just use checkout, update and commit, since I just need a backup with history.

I am trying Git now in a new project. Here is what I did:

  • Created a repository in Bitbucket.
  • Git clone to my machine.
  • Created a couple of files.
  • Git commit -a.
  • Git push.

All fine. I checked Bitbucket and the files were there. That was yesterday. Today I did:

  • Added some more files.
  • Git commit -a.
  • Git push.

And I got an error message. I didn’t save it, but it said something about fast-forward. For some reason I couldn’t push my commit to the repository. I did several fetches, commits and pushes and got the same error when pushing. Then I did a pull, which as far as I know is a fetch followed by a merge, then a push and it worked (kinda). My repository log looks like this now:

commit ef6b0e51c8278ef15d1d84770a56929f7c30cc63
Merge: 15d482c ab3938a
Author: xxx
Date:   Wed Jan 25 04:25:39 2012 -0200

    Merge branch 'master' of bitbucket.org:xxx/xxx

commit 15d482c0bd2e9b894afd779520dbfdbad7f43616
Author: xxx
Date:   Tue Jan 24 03:50:43 2012 -0200

    xxx

commit ab3938aaacb089f1c4f3bdbb8d843a105991f776
Author: xxx
Date:   Tue Jan 24 03:50:43 2012 -0200

    xxx

This is strange. The first commit is right. It was done yesterday. But the second should have today’s date. But it has the exact same date as yesterday’s, up to the seconds. And there is a third commit, which is just the merging, with today’s date.

Is this the way it is supposed to be? Or did I do something wrong? Do I have to merge between a commit and a push?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:51:30+00:00Added an answer on May 28, 2026 at 8:51 pm

    I figured out what the problem was. I checked “Amend Last Commit” on the second commit. So, basically I did:

    • Create repository on Bitbucket.
    • Clone.
    • Add file1.
    • Commit.
    • Push.
    • Add file2.
    • Commit –amend
    • Push.

    The error I got was:

    git.exe push --progress  "origin" master:master
    
    To git@bitbucket.org:xxx/test_repo.git
    ! [rejected]        master -> master (non-fast-forward)
    error: failed to push some refs to 'git@bitbucket.org:xxx/test_repo.git'
    To prevent you from losing history, non-fast-forward updates were rejected
    Merge the remote changes (e.g. 'git pull') before pushing again.  See the
    'Note about fast-forwards' section of 'git push --help' for details.
    

    I tried fetch and merge. Still couldn’t push. I had to do a pull. I got:

    git.exe pull -v --progress      "origin"
    
    From bitbucket.org:xxx/test_repo
    = [up to date]      master     -> origin/master
    Merge made by the 'recursive' strategy.
    Success
    

    Then I could push.

    Amending a commit that had already been pushed was the problem. That is why both commits have the same date.

    Thanks all for the help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I used to use netbeans for a while and really liked it. But now,
Some Background I have been using Git for a while now. The projects that
At my workplace we use SVN for version control. I switched to git-svn when
We use SharpSVN to programmatically access SVN repositories. Now we have the problem that
I'm new to this SCM, but since SVN is gaining popularity I was going
I just started working with Drupal for a while and decided to use this
svn move allows to move a file while retaining traceability of changes. Now I
I've been trying to use Git on my personal projects for almost a month
I've been using Capistrano to deploy for a while, but always with the SVN
I'm getting this error while doing a git svn rebase in cygwin Out of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.