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 7989119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:39:26+00:00 2026-06-04T12:39:26+00:00

I want to push only the last commit with TortoiseGit to a sourceforge repository.

  • 0

I want to push only the last commit with TortoiseGit to a sourceforge repository. All previous ones shall not be pushed. Here is was said I can create a new branch and push this one. But the new branch has all previous commits and not only the last one.

What am I doing wrong?

Thanks!

  • 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-06-04T12:39:28+00:00Added an answer on June 4, 2026 at 12:39 pm

    I think this is primarily a misunderstanding of how git works. When you push a commit, if that commit has a parent, git will make sure that that parent is in the remote repository as well. Aside from sparse clones (which may be useful for preserving bandwidth and/or disk usage, but impose some restrictions on how you can interact with remote repositories), git is designed to keep the object database complete and consistent. Completeness/consistency would be violated if you could push a commit without it’s parents being in the repository as well. So, by design, you can’t just push one single commit without git making sure that commits lineage is preserved.

    That said, there are two specific ways you can arrange to only push a single commit: 1) make sure that the parent of the commit you want to push is already in the remote database (e.g. use rebase to squash all commits on the branch down to a single commit, and possibly relocate that branch if necessary – but that may not be the best choice for your workflow), or 2) make sure that the commit you want to push has no parents – e.g. git checkout -b somebranch --orphan in recent versions of git, then create your commit.

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

Sidebar

Related Questions

I want to set my password on push only not for pull. Is there
I have a project that I want to push to a Mercurial repository on
Read about Server push here . I want to push data to client from
I created a branch on my local Mercurial repository. I want to push to
I don't see the options to accomplish this. I want to only push changesets
I want to push one button in Vim and fold all the code so
The short of what's below: I want to push commit messages to a subtree,
vector<int> l; for(int i=0;i<10;i++){ l.push_back(i); } I want the vector to only be able
Generally whenever i want to push in the changes to remote Git i follow
Howday, I want to push data to flex clients. I am talking about anywhere

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.