HertieDataScience / SyllabusAndLectures

Hertie School of Governance Introduction to Collaborative Social Science Data Analysis
MIT License
37 stars 60 forks source link

No commit possible anymore #49

Closed bjoernboening closed 8 years ago

bjoernboening commented 8 years ago

My desktop github didnt want to commit anymore "Commit failed - failed to create a new commit".

After making a security backup of my files, I deleted my local repositories and wanted to clone again for a "fresh start". The clone appears in my folders, but not automatically in the desktop github app. After manually adding it to the desktop app, it recognizes that I have outdated files (some old files were deleted by the master, and some are new, locally created on my machine). If I now want to merge my new files into the master branch, I get the commit error message. In powershell it says that one file (the research proposal as an Rmd file for the second assignment) is not staged for the commit and the other (the actual html file) is untracked.

How to continue? Is there a way to get back on track with the master files? Google says I should manually resolve the merging conflicts, but neither in my desktop app nor in power shell, I am able to force a commit. :( Any idea?

PS: The same problem exists for other repositories I had cloned in my desktop app.

bjoernboening commented 8 years ago

I tried to solve it in powershell, still getting errors: Maybe this log from powershell helps?!

E:\bjoer\Documents\GitHub\PairAssignment2 [master +0 ~0 -2 | +2 ~1 -0 !]> git init Initialized empty Git repository in E:/bjoer/Documents/GitHub/PairAssignment2/.git/ E:\bjoer\Documents\GitHub\PairAssignment2 [master +6 ~0 -0 !]> git remote add origin git@github.com:user/project.git E:\bjoer\Documents\GitHub\PairAssignment2 [master +6 ~0 -0 !]> git add . E:\bjoer\Documents\GitHub\PairAssignment2 [master +6 ~0 -0]> git commit -m "Initial commit" [master (root-commit) c5aeb41] Initial commit 6 files changed, 807 insertions(+) create mode 100644 .Rhistory create mode 100644 Literature Review.Rmd create mode 100644 README.md create mode 100644 Research Proposal RStudio Markdown.Rmd create mode 100644 Research_Proposal_RStudio_Markdown.html create mode 100644 library.bib E:\bjoer\Documents\GitHub\PairAssignment2 [master]> git push -u origin master ssh: connect to host github.com port 22: Bad file number fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists. E:\bjoer\Documents\GitHub\PairAssignment2 [master]>

Was that a bad idea?

christophergandrud commented 8 years ago

Can you link to the remote (GitHub) version of this repo.

bjoernboening commented 8 years ago

I hope I understood you correctly. I tried to link my local version to the remote version on github.com?

E:\bjoer\Documents\GitHub [master +4 ~0 -0 !]> git remote E:\bjoer\Documents\GitHub [master +4 ~0 -0 !]>

Does that mean there is no link to any remote?

Apparently github knows that my repo still exists:

E:\bjoer\Documents\GitHub> ls

Verzeichnis: E:\bjoer\Documents\GitHub

Mode LastWriteTime Length Name


d----- 22.10.2015 20:02 AnalysisJamboBukoba d----- 22.10.2015 19:05 AnalysisJamboBukoba-master d----- 22.10.2015 17:13 OLD d----- 23.10.2015 15:51 PairAssignment2

christophergandrud commented 8 years ago

Sorry, can you just send me the URL for the repository?

bjoernboening commented 8 years ago

https://github.com/laurencehendry/PairAssignment2

christophergandrud commented 8 years ago

Hm, two things to check:

What I would do is reclone the repo (this should open Desktop GitHub automatically). Make a small change and try to commit and sync.

bjoernboening commented 8 years ago

Hi Christopher, I cloned again, and magically it is now commiting and syncing. I've no clue what was the issue then. I now tried to clone directly from the Git desktop app instead of the website. Didnt know that this makes a difference as well?!

Thanks anyway for your help!

christophergandrud commented 8 years ago

My guess is that it had to do with running git init on a git repo. Though maybe this compounded the original problem rather than being the only cause of it.