Note that there are some explanatory texts on larger screens.

plurals
  1. POgit is 'M'erging un-committed edits when changing branches?
    text
    copied!<p><strong>Update</strong>: according to the link in my question below, 'M' seems to mean Merge'd when you see it during a branch change, but Modified with <code>git status</code>: <em>"When we switch to the master branch, the working directory is considered “dirty” since the README file has not been added to the index and committed. As a result, git will attempt to merge the contents of README from the test branch into the README file in the master branch:"</em></p> <p>Forgive my git ignorance, but why is it when I make changes in an upstream branch, and then checkout my master branch (without commit'ing), the modified file <a href="http://www.gitguys.com/topics/switching-branches-without-committing/" rel="nofollow">follows the current branch as a Merge</a>? I thought git only merged when I told it to merge. I don't always want my edits to propogate to another branch so is there a way to tell git to ask before merging? </p> <p>iow: How can I tell git to keep me from screwing up another branch if I acccidentally switch to it with un-commit'd edits in my current branch?</p> <pre><code>[on branch:foo] $ echo test &gt;&gt; main.c [on branch:foo] $ cat main.c #include &lt;stdio.h&gt; int main void (int argc, char **argv) { printf ("Hello world!\n"); return (0); } test [on branch:foo] $ git checkout master M main.c Switched to branch 'master' [on branch:master] $ cat main.c #include &lt;stdio.h&gt; int main void (int argc, char **argv) { printf ("Hello world!\n"); return (0); } test [on branch:master] $ </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload