Ämne på Diskussion:Developer guidelines

Hoppa till navigering Hoppa till sök

Don't store Github repos in Dropbox - possibly causing this problem?

Mattias Östmar (WMSE) (diskussionbidrag)

I've stored my repos in Dropbox out of ignorance. Now I have the following situation:

I got a Dropbox "conflict copy" of my main script file in the repo ("create_infotexts.py (Konfliktkopia för Mattiass MacBook Air 2017-04-05")

I deleted the conflict copy (since I'm somewhat a cowboy)

On Github I have a branch `places_from_desc`.

If I do `git pull origin places_from_desc` the branch is not pulled to my local. I still see this for `git branch`.

Can the file conflict have created this non-existing relation to the actual branch on github?

~/Dropbox/wmse/SMVK/SMVK-Cypern_2017-01[master ?*]$ git branch

warning: ignoring ref with broken name refs/heads/master (Konfliktkopia för Mattiass MacBook Air 2017-04-05)




* master


Alicia Fagerving (WMSE) (diskussionbidrag)

Honestly, when I get into problems like these, I just burn the local files with fire and download a clean copy from Github.

BUT I still use Dropbox since it syncs the files I don't track on git, like reports, logs and notes, which I probably shouldn't be keeping in the relevant dirs anyway... But it's nice to have access to them.

Mattias Östmar (WMSE) (diskussionbidrag)

Ah. I shouldn't have used git pull since that is actually both fetching and merging the branch into master (where I am standing). I should have used just git fetch origin places_from_desc.

To fix I run git reflog show to see the pretty git names of each event and select the HEAD(a){1}

I then ran git reset HEAD(a){1}

Did this actually undo the merge? Help wanted! See result here:


To get a local copy of the remote branch i then ran:

git fetch origin

git checkout --track origin/places_from_description

Now I can work on the branch again locally. Nothing do do with storing the repo i Dropbox obviously.