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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:06:33+00:00 2026-05-15T19:06:33+00:00

I have been reading up and trying Git for the last few days and

  • 0

I have been reading up and trying Git for the last few days and I have one more thing that i can’t seem to find good information on.

I read that with Git it’s common to set up a public and a private repository clone on each developer’s machine that way the developer can do private commits as many times as he/she wants and then only push to the public repository once they are satisfied with the changes.

I would like to know two things:

1-how do i set up a system such as the above (while using a centralized type approach (repository created with –bare).

2-I want to be able to make as many commits to my private repository as I want with any commit message and not have these messages (or revisions) show up when i push my changes to the public repository or the bare repository). Ie. i want my public changes to be committed as one lump sum with a single message.

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-05-15T19:06:34+00:00Added an answer on May 15, 2026 at 7:06 pm

    There are a few ways to set up a Git “central” server, as described in the FAQ, mainly via git-daemon, over HTTP or via an existing SSH server (if it’s on a Linux box, you can share a repository by setting unix groups appropriately and giving group permissions). Alternatively, you can use existing services like GitHub.

    If you want to push a number of local commits as a single commit, you can “squash” those commits, with git merge or git rebase -i (interactive). I find it easier to do with git rebase -i. You need to give a hash or identifier for a previous commit (from which you may want to merge) as an argument. Then, you’ll get a editor with something like this:

    pick 0000001 Fixed big bug 1
    pick a000002 Fixed big bug 2
    pick dae3124 Fixed big bug 3
    pick 3554abc Fixed big bug 4
    
    # Rebase 5cea2cd..8963229 onto 5cea2cd
    #
    # Commands:
    #  p, pick = use commit
    #  r, reword = use commit, but edit the commit message
    #  e, edit = use commit, but stop for amending
    #  s, squash = use commit, but meld into previous commit
    #  f, fixup = like "squash", but discard this commit's log message
    #
    # If you remove a line here THAT COMMIT WILL BE LOST.
    # However, if you remove everything, the rebase will be aborted.
    #
    

    You can then edit this file to have something like this:

    pick 0000001 Fixed big bug 1
    squash a000002 Fixed big bug 2
    squash dae3124 Fixed big bug 3
    pick 3554abc Fixed big bug 4
    

    Once you save the file, Git will offer you to edit the log messages of the commits you squash into one message. Effectively, you’ll have merged 0000001, a000002 and dae3124 into “Fixed big bugs 1, 2 and 3.” for example. (You could use fixup too.) You log will then be:

    0014234 Fixed big bugs 1, 2 and 3.
    3554abc Fixed big bug 4
    

    (Of course, the result hash of the merged commit will look nothing like the hashes of the commits it comes from.)

    Once you’ve done that locally, you can push that branch to the remote public repository.

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

Sidebar

Related Questions

No related questions found

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.