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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:57:26+00:00 2026-05-19T04:57:26+00:00

I’ve been doing some reading on how both the git merge and git rebase

  • 0

I’ve been doing some reading on how both the git merge and git rebase operations work, and I think I have a very basic understanding of the differences. I’ve seen the diagrams 🙂 Despite that, I’m still not clear on what would be the best of the two to use for my current worflow.

My work is using perforce as it’s SCM system, but I’m using git locally to keep track of local changes, do refactoring, and a bunch of other cool stuff that git can bring to bring to the table. I know there already exists a tool to help facility working with git and perforce (ex p4-git) but I don’t necessarily want/need that overhead, so I’m trying to keep things as simple as possible. Here’s a brief description of my current workflow for creating local git branches and eventually integrating back into our main perforce depot:

  1. I have a master git branch, which does a nightly p4 sync to our codebase. After the perforce sync, I commit all changes to the master branch. In effect, my master git branch is essentially a snapshot of the latest code committed to our perforce mainline.

  2. For local changes I’m working on, I always create a git branch first, and checkout this branch while working on the change.

  3. Every now and then I want to update my branch to the latest from the master. Until now I’ve just been issuing a git merge master command to do that and it’s been working out fine.

  4. When I’m ready to commit to the actual perforce depot, I merge my branch back into my master branch, by checking out the master and issuing git merge BRANCH and then submit using regular perforce commands

Given my workflow, should I really be using a git rebase master command for Step#3 instead of a git merge master? From my understanding of the rebase command, this would only be necessary if say our perforce mainline (remote depot) was branched, and I wanted to create a new master based off this branch (say I call it master-newbranch) and apply my changes to this new branch. I would need to rebase off this branch first?

In general, does my current workflow make sense, or have I already picked up some bad habits?

  • 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-19T04:57:26+00:00Added an answer on May 19, 2026 at 4:57 am

    You should not (necessarily) be using rebase over merge in this case. Remember, rebase essentially re-writes your history. It’s useful in cleaning up multiple branches and providing a more linear history, but from your use case you’re not gaining anything by using rebase. The behavior you’ve described is a normal git workflow which merge was designed for.

    The tricky thing about rebase is when you’re rebasing (re-writing history) commits that you’ve already pushed. This can cause major headaches in collaboration with others, but you’re using perforce for collaboration, so you’re unlikely to run into this problem.

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have just tried to save a simple *.rtf file with some websites and
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a bunch of posts stored in text files formatted in yaml/textile (from
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I am trying to loop through a bunch of documents I have to put
I'm looking for suggestions for debugging... If you view this site in Firefox or

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.