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

  • Home
  • SEARCH
  • 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 7406611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:35:03+00:00 2026-05-29T05:35:03+00:00

We’re currently using git and I tried to come up with a reasonable workflow

  • 0

We’re currently using git and I tried to come up with a reasonable workflow for people to use, but there’s currently one issue that I’m not sure how to resolve. If there is a conflict when we do the merge back into the master branch, we lose the history in the squashed commit message, which is something we want to keep. The current workflow is below:

  1. git pull – This should be done on the master branch.
  2. git checkout -b TASK-ID – Create a new branch for the task. TASK-ID would be something like TASK-101
  3. Work on the task and commit changes as needed.
  4. When done with the task, git checkout master
  5. git pull – Get any changes that have been made since the last pull.
  6. Resolve any conflicts and ensure the current version in the master compiles.
  7. git merge --squash TASK-ID – This treats all of the commits in the branch as one commit when merging.
  8. git commit – Add any additional information, specifically the TASK-ID, to the commit message. It should be noted that all commit messages from the branch are included, so they were not lost when the merge occurred.
  9. git push – Push the changes back to the server.

Some background: there are not a lot of us working on this currently, we don’t see conflicts very often. The reason for the squashed commit is so that we have one commit for each task. This way if our Bamboo server finds a problem with a build, we can easily tie it back to a task and have the developer fix it. Also, it keeps the master history cleaner because I, at least, tend to make a lot of commits. Yes, I know this may have to change if we start dealing with larger teams, but that’s in the future.

Now, I do realize that in this case, we can simply do the pull after the merge, however that doesn’t completely solve the issue since there’s a chance that one of our developers may have to switch branches temporarily to fix an issue or work on a higher priority. What I would love to see is how we can achieve what I’m getting now without losing the commit history in the squashed merge. I’ve looked into several solutions using rebase, but none of them were quite what I was looking for.

So, to summarize, the requirements I have are:

  1. Clean history in the master
  2. Can see the changes in the branch in the message for a single commit
  3. The commit message for the squashed commit needs to be edited to have the task ID in it before committing the change. (Amending could work as well).
  • 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-29T05:35:04+00:00Added an answer on May 29, 2026 at 5:35 am

    Maybe I misunderstood, but what I normally do is keep my master always equal or behind the master from origin.This way, when I do a git pull, it never has any merges to do (since history of the master is never overwritten in my team).
    After I do a git pull, I go to the branch TASK-101 and merge the results of the master into this branch. So task-101 will have my commits, the commits that are in master, and possibly a merge commit. I can do this every time I feel the need to update my working repo.

    When I’m ready to commit, I do this one last time, and then I go to master and squash merge the commit from task-101, and do a dcommit afterwards, to avoid the probability of conflicts because the time window between the last pull and the push is very small.(it never happened once in my team. If it happens. if it ever happens, I will probably have to notify the team and rewrite history).

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am reading a book about Javascript and jQuery and using one of the
I want use html5's new tag to play a wav file (currently only supported
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is

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.