Note that there are some explanatory texts on larger screens.

plurals
  1. POgit: updating the current branch
    primarykey
    data
    text
    <p>There are 2 git repositories, A and B</p> <p>On both there is only a master branch, and both are locally checked out and being worked on.</p> <p>I am pushing into B's master branch from A and I receive this message:</p> <pre><code>warning: updating the current branch warning: Updating the currently checked out branch may cause confusion, warning: as the index and work tree do not reflect changes that are in HEAD. warning: As a result, you may see the changes you just pushed into it warning: reverted when you run 'git diff' over there, and you may want warning: to run 'git reset --hard' before starting to work to recover. warning: warning: You can set 'receive.denyCurrentBranch' configuration variable to warning: 'refuse' in the remote repository to forbid pushing into its warning: current branch. warning: To allow pushing into the current branch, you can set it to 'ignore'; warning: but this is not recommended unless you arranged to update its work warning: tree to match what you pushed in some other way. warning: warning: To squelch this message, you can set it to 'warn'. warning: warning: Note that the default will change in a future version of git warning: to refuse updating the current branch unless you have the warning: configuration variable set to either 'ignore' or 'warn'. </code></pre> <p>If I work on B's checked out master branch, how can I update it, so I see A's changes?</p> <p>What if there are also changes in the local checkout of master on B already that are not commited?</p> <p>Note: I do not really understand git's message above. Does "cause confusion" mean, it is bad and can lead to data loss? Or does it just mean it is a situation that is not easy to handle, but I can as usually trust that all my changes are kept somehow and I will be able to solve conflicts if necessary. What does "see the changes reverted" stand for? Does it mena some changes are lost?</p> <p>For me as a foreigner this language is not very clear.</p> <p>Edit: I just added a file on A and pushed it to B. On B I receive the status that the file is deleted.</p> <p>What would be a simple workflow to handle the situation?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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