<div dir="ltr">If you do <div><br></div><div>git reset --soft refs/heads/master<br></div><div><br></div><div>That will leave you in a state in which</div><div>- your current branch is master again</div><div>- you still have all your files.</div><div><br></div><div>There you can commit onto master.</div><div><br></div><div>------------------------</div><div>Another posibility (maybe tidier) is to do that in another branch, so first:</div><div><br></div><div>git co -b new-branch-name</div><div>git add ...</div><div>git commit ...</div><div><br></div><div>and after you have everything working you go back and update master:</div><div>git co master</div><div>git merge new-branch-name</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 12, 2016 at 10:40 AM, Jakob Reschke <span dir="ltr">&lt;<a href="mailto:jakob.reschke@student.hpi.de" target="_blank">jakob.reschke@student.hpi.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><p dir="ltr">To determine the correct/best course of action, it might also help to see what happened or where your detached head actaully is (oh, the plethora of possible puns!). You can look at the history graph with `gitk --all` (it should come with git). You can also create, checkout and move branches around there or do things like cherry picking, maybe even merging, not sure atm.</p>
<div class="gmail_extra"><br><div class="gmail_quote">Am 12.10.2016 03:21 schrieb &quot;John McIntosh&quot; &lt;<a href="mailto:johnmci@smalltalkconsulting.com" target="_blank">johnmci@smalltalkconsulting.<wbr>com</a>&gt;:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> </blockquote></div></div>
<br></blockquote></div><br></div>