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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:41:30+00:00 2026-05-31T09:41:30+00:00

Using Emacs/Magit, I had first a very smooth git experience in another project, but

  • 0

Using Emacs/Magit, I had first a very smooth git experience in another project, but in my actual project I’m confused by all the branches and annoyed by the not tracked #file.ext# that pop up al the time. Here is how it looks:

a4cc383 master [remotes//master]
e08a624 origin-master [remotes/origin/master]
6a64828 tj-branch
a4cc383 remotes/origin/master

What I planned to do is to work on my personal branch (tj-branch), commit, then merge with master, then push to the remote repository.
But I have too many master branches for my taste. I would expect origin master to be the tracking branch, and master the local copy of it. But then I would need 2 merges before I can push – isn’t the tj-branch redundant then?

What about

a4cc383 remotes/origin/master

Is that a branch too? Why does it exists, why do I need it?

My questions:

  1. which branches do I really need, which can be deleted?

  2. from my local branch – which master do I have to checkout, then merge with, to push my changes: master or origin-master?

  3. when I try to change branches, I’m often asked to save open emacs buffers and then told ‘file has changed on disk, do you really want to change’, and its very confusing because I don’t know sometimes which one is the new version – on disk or the buffer. Where is this problem coming from?

Sorry for the rather noob question, I read some good tutorials about git, but still don’t get my heasd around the master branches.

  • 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-31T09:41:32+00:00Added an answer on May 31, 2026 at 9:41 am

    pls find answer as follows:

    which branches do I really need, which can be deleted?

    Now, I see the following branches from your logs:

    1. a4cc383 master [remotes//master] (?? I am not sure why you have this branch, what operation you did?)
    2. e08a624 origin-master [remotes/origin/master]// this branch is ok, it represents your remote master, if you use git fetch, you can get latest change to this branch.
    3. 6a64828 tj-branch //This is ok, your branch.
    4. a4cc383 remotes/origin/master //I am not sure why you have two remotes/origin/master, but different sha value.

    Actually, you can go into your .git folder, and cd refs, in this folder, your local branch will in the refs/heads/….., you remote branch should be here: refs/remotes/origin/xxx

    from my local branch – which master do I have to checkout, then merge with, to push my changes: master or origin-master?

    You can checkout your topic from master, do some change, commit them, git checkout master, and git merge your changes, after this, push your change like this, git push origin[the default name of your remote repo] master[local branch]:master[remote branch]// git is so clever.

    when I try to change branches, I’m often asked to save open emacs buffers and then told ‘file has changed on disk, do you really want to change’, and its very confusing because I don’t know sometimes which one is the new version – on disk or the buffer. Where is this problem coming from?

    You must commit your local changes before checkout, if you do not want to commit, you can use git stash //this will keep you change, if you want to restore it, you can use git stash apply

    Hope this is helpful for you.

    Br,
    Tim

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

Sidebar

Related Questions

I am using Magit to work with git in emacs. I have bound magit-status
I am in the very first step of using Emacs as my programming environment.
I'm starting a project using Qooxdoo and emacs with js2-mode(great tool btw) but I
I am now using Emacs 23 with visual-line-mode turned of for text editing but
Basically I am using emacs on remote server (my school) but when I logged
I've been using emacs for all of my text editing needs for the past
Im using emacs and etags to navigate my way round a project, is it
I'm using emacs over sshfs and a git repository. I enjoy using the git
I have been using Emacs for more than three years now but it still
I've been using emacs/slime for coding lisp, but with Clojure I found 'lein swank'.

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.