I cloned of a repo to a USB stick and took it away to make changes. Then I wanted to put the changes back:
$ cd <clonedgitrepo> $ git push <blah blah blah> ! [remote rejected] master -> master (branch is currently checked out) error: failed to push some refs to '<remotegitrepo>'Oh dear. But after some googling, I found I can do this:
$ cd <remotegitrepo> $ git checkout --detach <blah blah> 'detached HEAD' state <blah blah> $ cd <clonedgitrepo> $ git push <blah blah blah - works> $ cd <remotegitrepo> $ git checkout master <blah blah blah>Success! Now to post this to DW so that I can find it again next time that happens...