GitHub for Windows is showing old README text - github-for-windows

There is a panel on the right that is supposed to show current content of README.MD. However, I noticed that after changing the content of REAMDE.MD is hasn't updated the text in the panel. Is there a way to forcefully refresh it?
The version of GitHub for Windows I have is 1.0.41.2 (fd3fd236ac85e622194e88f248576b9fe25d28d4)

Yeah, sorry about that. It's a bug and we're working on it. It's currently cached for 30 minutes and sometimes it doesn't expire when it should.
The only way to force a refresh currently is to either delete the entire folder at %LocalAppData%\GitHub\BlobCache.api.github.com or to locate the file in that folder that holds the README content (by looking for keywords that would appear in the README for example) and deleting that.

After a quick search in the \AppData\Local\GitHub folder I found that the old value from README.MD is stored in one of the files in the BlobCache.api.github.com. Deleting the whole folder and restarting the app solved the issue.
Still wondering if there is a proper way for doing that from UI? Shouldn't it happen automatically anyway?

This came from GitHub staff. It tells you how to clear the cache.
WARNING: This will remove GH4W's references to your local repositories
and your logged-in account. You will have to log in again and let GH4W
re-scan your computer for repositories.
There's a known bug where we cache the 'NO README' view if you add a README after adding the repository to GitHub for Windows.
If you'd like to try to get the README to show up, you can delete the cache:
Here are the steps you will need to follow to delete the cache:
Close GitHub for Windows
Open the Git Shell
Run 'github —delete-cache' to clear our the GitHub for Windows cache
Restart GitHub for Windows — you will need to log in and add your repositories again

Related

Why does my GitHub page not update its content?

I've been following the official guide # pages.github.com
So far I've created the local repo and pushed it to GitHub, but, whatever change I do, I can see it in my repo at GitHub but not in my GitHub page. How is that possible?
A bit late to the party but I just had this issue and my solution isn't covered by any of the above.
Specifically my issue was the following:
I had created a github.pages site with a custom domain.
I was pushing commits to the correct GitHub branch but not seeing the updates on the github.pages site.
Solution:
The issue turned out to be my browser caching the page (despite my having page caching disabled). To fix it I just cleared my cached data from the past hour and that worked instantly.
To clear the cache data in Chrome go to the Chrome menu then More Tools > Clear Browsing Data.
I don't know what caused the caching, this github.pages/custom domain combo is the only thing that has ever caused it for me.
Sometimes this happens to me too: after creating and pushing the gh-pages, the GitHub Pages page is missing or not getting updated. Even if I commit more changes to the branch and push it again, it won't update on GitHub pages.
If I remember correctly, I solve this by deleting the branch from the server and pushing it again:
git push origin :gh-pages
git push origin gh-pages
I might have to add some dummy commits and push again to trigger the update, I don't remember exactly...
I had the same issue.
The problem was that my website was publishing from the gh-pages branch, but I was pushing my recent changes to the master branch.
Check which branch Github is publishing your website from. In your repository, click on Settings, scroll down the page and there should be a box where you you can change the publishing branch.
It should look like this:
More info is here
Also if you are using a custom domain name, make sure your CNAME file is up to date.
Hope that helps!
I fixed this problem.
you can try to go to the setting page.
I go into the project settings page (.../settings/pages) ,and found Github pages give me some message "some syntax error", I fixed it, and ok.
Try to push empty commit like this
$ git commit --allow-empty -m "Empty commit"
Works like a charm for me every time.
To solve this issue
Switch your current Github Pages branch to some other branch and click
on Save
Switch back to your desirable Github Pages branch and click on Save.
This will force Github to update your changes.
I am a novice and please allow me to answer with tears. Please go to settings at your repository, scroll down to to check WHETHER THERE IS A PROBLEM with your current webpage. If there is a problem, your site WILL NOT BE UPDATED. I think it's a protection mechanism or something.
This morning I deleted and moved some of the files in repository, I have updated many times and it still remains on previous version, even I checked the index.html has indeed updated. Later I shut down the whole repository and started new one, inserting items one by one, but still met the problem. I tried new branch like gh-pages, I think it is not necessary for a beginner like me. Later I checked my settings and found the notification, I deleted the problematic files and it worked instantly. Were I knew the problem I would not have been so stupid to shut down it forever. I miss my old git records. Guess every lesson takes a price, Github is no exception.
Experienced this problem when a filename contained the word "vendor" ex.:vendor.bundle.20d44fcf5147c6ed68a3.js
Adding an empty file named .nojekyll in the root of the repository fixed the issue.
Jekyll now ignores the vendor and node_modules directories by default
https://github.com/blog/2277-what-s-new-in-github-pages-with-jekyll-3-3
Try to disable GitHub pages, and enable it after a few minutes. I tried. This works. But It takes some time to update and re-enable GitHub Pages.
Press ctrl+F5 to re-download cached content.
I tried Janos' answer but it didn't work for me.
I made a slight change to my index.html file (something insignificant) and pushed to the gh-pages branch again. I tried opening the page in a different browser and it worked. My original browser updated the page too although I don't think it's a browser cache issue.
I rebased master with gh-pages locally and pushed that as well, not sure if that makes any difference.
This answer is for those who have created their app with create-react-app.
It took me days to finally find the answer for react-gh-pages not updating. I hope the following answer helps as it did for me. It is a combination of multiple answers that I have researched over:
The main and most common reason is your browsers caching feature. In order to disable it for every rendering of your index.html,
Add this snippet in your index.html file under the public folder.
<meta http-equiv='cache-control' content='no-cache'>
<meta http-equiv='expires' content='0'>
<meta http-equiv='pragma' content='no-cache'>
Push any new changes to the master or main branch(not to the origin gh-pages).
By now your master branch is updated.
Now run: git push origin :gh-pages. This will delete the gh-pages branch.
Run: npm run deploy. This will re-build your app and re-create gh-pages branch
with updated content.
Now go the settings section on the top-right side of your app repo page. Scroll down to the bottom. Under Github Pages section, under source, there is branch section. Change that to your master branch or main. Keep the root folder as it is.
Go to your site and you will see a Readme file. It may take some time. After a minute or so change the branch back to gh-pages. After a minute visit your site and it should be updated by now.
I hope this helps! Let me know if it worked for you as well in the comment section, cheers!
I recently had an issue where my github pages hosted site wasn't updating from an old branch push in master. I was able to see the new changes by going to domain.com. (the dot at the end is important), and also hard refreshing would show the new changes, but with a regular refresh, it would show the old site and the old JS files too.
My problem seemed to only be in Chrome, which is where I was developing the site. For full disclosure, the old changes were in React and hosted in Netlify. The new changes that I was trying to get to push and display were static files hosted in github pages.
THE FIX (in Chrome): devtools > Application > clear site data (button).
Here is what worked for me:
First Step (update your master):
git add .
git status # to see the changes to be committed
git commit -m "comments"
git push origin master
Second Step (Update gh-pages):
git-checkout gh-pages # going to the gh-pages branch
git rebase master # sync gh-pages with master
git push origin gh-pages # commit changes to gh-pages
git checkout master # return to the master
I had the same problem everything is up to date in my repository but it still wasn't loading to my github page, so without making any further changes, I tried to add, commit and pull.
I fixed it with another git commit, and git pull again.
Now the changes are loaded to my git.
The easiest way:
Settings -> Braches -> choose "gh-pages" -> UPDATE.
Take mine as example
In my case, it helped to run:
npm run deploy
I did it after pushing the master branch to GitHub. I needed to wait a bit until the changes were visible on my page. But it did work without changing any settings.
In case this helps someone else...
For me the issue was the content in the branch was being updated, but the filenames did not change, so browser was retrieving cached content.
I'm using Angular CLI with angular-cli-ghpages. Setting the configuration to production appends hashes after each file in the build forcing the browser to retrieve the new content.
sample deploy script:
ng build --configuration=production --base-href \"<repo-name>\" && ngh
If you don't want a production build, you can also specify output hashing in other build configurations in angular.json
If you're using the gh-pages command you may need to delete the gh-pages cache at node_modules/gh-pages/.cache
The issue is being caused because of the browser caching the page. Open the git link in incognito mode.
If your GitHub pages repo is private AND you have recently downgraded to GitHub Free, this might apply:
Your subscription, GitHub Free, does not support GitHub Pages sites
for private repositories. After we introduced free private
repositories in January, we found a limited number of sites connected
to private repositories were mistakenly left active. If you’d like to
keep updating this site, you can make its repository public or upgrade
to GitHub Pro. You can also unpublish it below. This site is using a
custom CNAME: Secure your domain name before unpublishing this site.
I reflect my changes in my deployed GitHub repository after committing locally, by renaming my gh-pages branch to master and unpublishing my GitHub Page, and then re-name the branch to gh-pages and then publish it again; then it works.
In my case it related to an issue in my config file. This showed up on Settings -> Pages.
If your page was online, but after update no changes visible:
1: Change repository to private
2: Change back to public
3: Enable "GitHub Page" function again
A couple have mentioned looking for error messages in Settings->Pages, but a better place to look is the stdout of the jekyll build workflow under the About tab. In either case, an error message of any sort is best to have in hand before starting on any of the other 26 answers given above.
For those who find solutions above not useful try this:
delete "build" directory on your local machine
run "npm run deploy"
Deleting directory helped me, it will reflect changes on github pages branch, then wait a minute, if you still dont see any changes, try clearing cache or visit your page in incognito
Worked for me.
After making changes in your script, go down to the commit changes section. There you'll find one input box and one text-area. As you all know filling those boxes is not mandatory, but they are there for a reason. So, next time before clicking on the commit changes button give this a try >> make sure that you write something in the first input box (you can leave the text-area empty), and what you write is different from what you wrote for your last commit for the same file. In this way github will be able to distinguish between the current script and the updated one, and the change should be reflected almost instantly.
Hope that helps.
The problem is caused due to browser caching the page.
Disable browser caching with meta HTML tags. Add the following in _layouts/default.html
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
WARNING: After this any browser supporting Cache-Control will not store any of your cookies or files.
Just clear browser's cache.
ctrl + shift + r for Chrome, as example
Nothing to worry, to Update your git react code rebuild code by using command
npm run deploy
react code will updated to gh-pages

Github Mac App How To Change Default Storage Directory

In the github mac app i am trying to change the default directory of one of my repo's. In the settings screen I only see a place to change the remote repo.
Where do I need to go to change the default location? Sorry if it is very obvious.
So after some trial and error I figured out how to change the location after you have set it up. Apparently it is as easy as just moving the folder that contains the .git. So for example I just moved the website folder into a new directory and the GitHub app was able to track the movement.
Edit 1: The move does not always stick so you might have to try a couple of times.
You manage the local destination of each remote repository you clone at the moment of cloning.
As soon as you click the Clone in Desktop button on a repository's page (on github.com), GitHub for Mac should open up (assuming you've configured the app to be opened up when Clone in Desktop is clicked). When the app opens it first prompts you to choose the location for cloning the repo (cloning means downloading or copying the files). This prompt is where you set the default location for this particular repository on your local machine.
In the interest of users who came here with the same doubt, let me post also my experience.
I wanted to move the GitHub local folders away from the "Documents" folder to free up iCloud space, and because I really didn't need yet another copy of the codes in addition to the one in my machine and in the GitHub servers. That is how I landed in this page in the first place. So I simply moved the folders to a local folder that is not synchronised with iCloud and when I opened GitHub Desktop to confirm if things were working, the app told me "Couldn't local [repository X]." They had a "Locate..." button, which I used to let the app know where the new location was. And I did this for all of my locally cloned repos. That's it, works like a charm now. If you have a lot of repos cloned locally, it might be a one-time hassle to do this, but there's no further action.

GitHub pages are not updating

I'm running into a weird issue with GitHub pages. I pushed a new commit to my personal pages page maltzj.github.io, but the new article isn't showing up there. When I execute the server locally, a post lives at localhost:4000/posts/the-price-of-inconsistent-code/. However, when I go to http://maltzj.github.io/posts/the-price-of-inconsistent-code I get a 404. I also added a new file which should live at http://maltz.github.io/test.html, but that also throws a 404.
Everything builds and runs locally. My Git repository is up to date, and there is nothing on the GitHub status page about problems with builds, so I'm at a little bit of a loss about where to go with this. How can I get my page to update with new content that I add?
For reference, the location of the repository which backs my page is http://github.com/maltzj/maltzj.github.io
None of these solutions solved it for me. The solution was to edit the index.html file in the GitHub website.
The website then updates on the web as expected.
Go to your index.html file through your site (example.github.io/index.html) and then reload the page. Then you can go back to (example.github.io) and it should have updated. You can do the same with the master.css file, etc.
If it doesn't work, try reloading (github.com/example/example.github.io/[blob/master/]index.html) instead and it will have updated.
For others, also check the dates of your posts. I just had this problem. I'm at UTC+11 and I'm pretty sure the server is at UTC. Thus if I date my posts with my local time, the server thinks they are in the future and won't build them. Using UTC avoided this for me.
As mentioned by joao cenoura in the comments below:
you can tell jekyll to show "future" posts by adding future: true to your _config.yml
and/or add timezone: TIMEZONE to specify your timezone.
See https://jekyllrb.com/docs/configuration/ for more info.
I had an empty CNAME file. Check that if you're having a similar issue.
I had this fault today with a static page - the cause was actually a service failure at GitHub Pages itself. You can check for service messages at https://www.githubstatus.com/.
I had the problem of having an unverified email. The update worked for the first time, but it failed after that. A verified email is needed to trigger a GitHub pages build. Also a deploy key cannot be used for this, as it won't trigger a build.
Source: http://web.archive.org/web/20140712011932/https://help.github.com/articles/troubleshooting-github-pages-build-failures/
Disclaimer: this was the case in 2014. Don't know if it's still required.
I had an unclosed <a> tag which caused the build to be pending forever. Fixing that solved the issue.
It makes sense that GitHub would verify your links.
I got it to work.
Mine was a simple problem. It was a browser cache problem.
I opened my link on a different browser and it showed me the updated push.
In my case, none of above solutions works. Finally I find out the reason is: there is "relative_permalinks" option in my _config.yml. This option is recently deprecated in Jekyll 3.0.
Refer to:
https://help.github.com/articles/removing-relative-permalinks/
I know this might sound simple, but make certain you are on the right branch and in the right file.
In my case, I made a GitHub page and tried to commit from my local repository on the master branch. Also, I was updating my filename instead of index.html. These were my errors. I had to switch to the GitHub page branch and update in the index.html commit, push and then everything worked fine.
For me, I just waited ~5 minutes, and it was updated.
If someone has made the branch gh-pages from scratch (manually) the problem is that you need a file call params.json to make it work.
I don't have this params.json file, but it still works...
In my case, it happened to be that I mentioned a relative path to refer to an image, something like - ./test.png.
It seems that it's not allowed, and it may be a security issue or what. Whatever, if you've done something like that, remove it and refer to it as test.png.
In my case the problem was because of my repository was private. After I made it public, the problem has gone.
The weird part of story is that I was able to create private repository and use GitHub pages with it. I did it in accordance with the official guide (http://take.ms/p2SS7). It worked fine for about 9 commits, but on the 10-th it became broken.
I ran into the same mysterious issue today. I pushed some new code to my github.io-repository, but the changes did not show up on the corresponding webpage. I inspected the page and did not see the new code in the source. I solved the issue by doing a hard reload. On Chrome, you can do a hard reload by opening up Dev Tools and right-clicking on the refresh-button and choosing Hard Reload.
Please refer to the Jekyll troubleshooting website, as there are multiple error sources: Troubleshooting Jekyll build errors for GitHub Pages sites
In my case a German umlaut ("ö") in a Markdown file caused the problem.
In my case, I forgot to define kramdown in _config.yaml
# Build settings
markdown: kramdown
This was caused when I was converting from a theme without to a theme with the kramdown requirement.
Make sure your run
npm run deploy
Clear your browser cache.
In my case, after trial and error on some solutions here, what fixed it was adding the encoding to the _config file like this
encoding: UTF-8
More troubleshooting options here
For me it was an issue with not properly having a .gitmodules file.
I was able to troubleshoot in the settings tab of my repository, under the GitHub pages section, which indicates build issues and was helpful for troubleshooting.
Oddly (and simply) enough I created a new branch, made that branch the "default" branch and pushed from there.
This worked for me.
My GitHub Pages was turned off under the Settings tab of the repository.
I don't remember turning it off, but there it was, and turning it back on was the fix.
In the repository settings, make sure the GitHub Pages is currently being built from the gh-pages branch.
In my case, my problem was after git push my GitHub file was updating but not showing my website on GitHub pages.
Note: I was creating Website by React
Also, on the HTML project, I faced the same problem. In that case, I just did first of all git pull and then git status | git add . | git commit -m"adding some content" | and git push. It worked for me.
But in the React project, it didn't work. I run this again on my cmd npm run deploy then my React web application is showing on GitHub pages.
My suggestion is to try everything showing on this post comments. Because the solution to this problem is not one.
In my case I left an empty parameter, url, in _config.yaml.
After I've specified url: example.github.io everything started to work.
I had this problem this week and no solution worked.
I don't use Jekyll, only pure static HTML.
It just sat three days refusing to update.
Here is what I had to do to get it to publish again.
Make a snapshot branch from master.
Reset the master branch to the last commit that is live. (Commits tab, green checkmarks indicate published commits)
Make a new commit with a smoke test. I made an HTML comment I could grep.
Force push master.
Check results curl https://example.com | grep SMOKETEST
Reset master again, removing the smoke test.
Cherry-pick each commit from the snapshot branch you need to get your unpublished changes back into master (cherry-picking gives the commits new ids/hashes, avoiding the risk of anything having cached them from before).
Force push master again.
Now you should get green checkmarks and published updates.
Note: It could be enough to force push to remove the commits that are stuck and getting them back again. The smoke test is almost certainly not required. Cherry-picking may not be required.
Github doesn't publish to github pages for me if I edit and commit files directly on github web site.
However, if I edit file locally and commit with GitHub Desktop, then change is published to site within seconds.
BTW, my email is verified, so this shouldn't be an issue. And I'm using same account.
Solution worked for me for an app created using create-react-app :
Go to GitHub Pages section under repository settings
Change source from gh-pages branch to master branch
Wait and check your custom domain website, should show master branch README.md file
Now change the source back to gh-pages
Wait couple minutes, now latest changes reflected on custom domain website
I had tried different solutions, none worked. Like a new commit, an empty commit, browser cache clear, wait for 5 - 10 minutes, delete gh-pages branch and push again, edit CNAME, create a new CNAME under on master branch etc
Note: My app has no _config.yaml file, no jekyll. I'm using custom domain with https (google domains). gh-page branch auto created by package.json script deploy: "gh-pages -d deploy"
In my case, I had made a couple of changes in the index.html and style.css files but those changes were not reflecting on the Github pages. But when I updated the Readme file by adding one line the Page got updated.
Maybe you can try this, as it might work for you just like it did for me.
If you are deploying some simple HTML codes, try this:
First, go to Actions > Deploy static content to Page:
Then, click the Run workflow:
My site failed to deploy today because of a transient failure in the GitHub Pages deploy actions. The action needed to be re-run through the Actions tab for the new version of my site to appear.
The story:
I pushed new content, on a site that's purely static and doesn't use Jekyll. After many fruitless Shift-Ctrl-R reloads on Chrome, I decided to investigate. I first visited Settings→Pages for the site’s repository, and saw that no recent deploy had taken place.
Why not, I wondered? After double-checking that my push had really gone through, I clicked the word “deployed”, and was taken to a GitHub Action that had failed!
Since the error message ECONNRESET looked like a generic network error internal to GitHub’s network, and not any problem with my site, I clicked the “Re-run” button in the upper right and asked GitHub Actions to re-run the failed task. Within a few seconds it had been re-tried and had succeeded!
Lessons:
Deploys are vulnerable to transient errors.
Deploys these days happen as normal GitHub Actions that you can inspect.
The deploys can be re-tried.

Windows Github issue pushing a new folder

I'm a VSS (Visual source safe) & Dropbox guy but new to GitHub. I'm using Windows Github tool to manage repositories on our remote server as I concluded in my previous SO post. I was glad to have sought this single point easy to use tool without any need for a deeper knowledge of git.
Things have been working fine until one day I had to add a new folder
to my repository. The Windows Github tool wouldn't recognize the
folder as a new content to be pushed! After some struggle I derived
that it "does" maintain sync with my "initial folders" but simply
creating a new folder in the repository directory wouldn't sync it
like Dropbox!
I searched to know how I can do it or if I had to use GitShell. My bad any I tried it, failed. Finally, I decided to purge everything and re-create the repository folder structure with this new folder like I did with my initial setup. But I don't know how or why it kept saying that the /.git/index file was being used by another process. I tried to empty this folder but it wouldn't. Finally, a logoff was able to free that file for me and I re-created everything. Pheew!
I might be doing it wrong as a newbie or even misusing Git due to my Dropbox habits. Pls correct me! What would be the best way?
My usage is more like VSS & dropbox(with version control) in a small remotely connected team. I started with this simple Windows Github tutorial. What about the following two -
TortoiseGit
msysgit
Do they provide better management? Pls suggest if Windows GitHub is the best (if so how to add folders later?)
Just in case, do note that adding a folder won't trigger anything for Git: you won't be able to push it if that folder is empty, because Git will consider it as "no content", and will ignore that new folder.
See also "How do I add an empty directory to a git repository?".
If you add a folder and some files in it, then the GitHub for Windows interface will detect that new content, and ask you to add and commit, which means you will be able to push.

Github windows: Commit failed: Failed to create a new commit

I have: http://windows.github.com/
My current project has around 20k files, around 150MB (and not speaking about how slow it is and I cannot do a thing now) it doesn't even let me commit! I get this error: Commit failed: Failed to create a new commit.
That seems that nobody is having.
I've already deleted the folder and cloned again, no escape. What to do?
If I choose to open shell, all this *** crashes!
Edit:
Since the problem I've switched to Git Extensions and I didn't look back!
thanks for your answers
This happened to me. Try opening up PowerShell and manually committing each file using the "git add [file name]" command. To see which files have been added, enter "git status" into the command line. The green files have been added, the red ones have not been added.
Once you've added them all, type "git commit." Then go back to Github for Windows and sync it up.
I'm not sure what causes this issue, but once I followed the above steps, Github went back to its normal, awesome behavior.
I had this problem too after an unexpected crash. I couldn't fix using the 'Open Shell' option as suggested. I had to open the Windows CLI (Start -> run -> cmd) and delete the index.lock file in my GitHub folder:
cd \Users\myUser\my\local\github\repo
cd .git
del index.lock
Then when I went back to the GitHub app, it committed successfully.
Note that for some people, according to comments, the file to delete doesn't have the .lock extension, so the delete command could also be del index.
Im using Githug for Windows (7) and faced the same problem. While using PowerShell I realized that I didn't fill Full Name and email address in tools > options. Look like a beginner mistake (and I am!).
hope it helps!
just try to commit a few from your updates. 5 for example. and then make another commit with all other updates.
I am using windows client and getting the same error. Then suddenly I realized that my local db in app_data was opened on the SQL management. It just simply can't commit the some files to github if they are opened or using at the other programs.
Just disconnected management studio closed it and just simply committed.
This may be your case also. Check your files out!
So guys this is the full steps I had to take in order to fix the problem...
1) Using Process Explorer (you can download it form here http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx) I searched for any process referencing ".git\index" and then I killed it.
2)Then using Git Shell (Windows Power Shell) I went into the repository which was giving me such difficulty and then furthermore went into its .git folder. (cd .\your_respository_name\.git). I then removed the index.lock file in that directory (rm -r index.lock).
3)Then from within that same directory I ran git reset HEAD.
4)Then I manually committed each file using the "git add [file_name]" comand. (You can check that they were added successfully if when you run git status, the files are green.
5)Next run git commit if your files are added correctly.
6)Finally go back to github for windows and sync everything up and it should hopefully work and resolve the problem.
This issue seems to be a bug in the github client - I get it "all the time" on the machine on which i only installed the github client.
I Never saw it on the git + github PC (I have not used it for a few days now).
Doing the "git add ." and then "git commit" worked for me also on the shell - but that is the thing the GUI should be doing not me - otherwise I can just stick to the git shell client.
Had the same problem, couldn't commit or sync using the windows GUI, but I could commit the changes through the shell. Once I'd added the changes through the shell the windows GUI started to sync normally. Hopefully it's a one off.
I had an interesting issue - even though I had an excel file open called "Combined - ForImportv4.xlsm", Git UI had no problem checking that in but it gave the error in the OP's subject for the backup file "~$Combined - ForImportv4.xlsm" so I discarded that change and all went through.
PS: As for why i'm checking an Excel file into Git ... just don't got there :)...
I had this issue with the git windows desktop commit tool. I was getting this often and I figured out that Visual Studios was locking the files. To get around this issue I simply closed visual studio and the commit / sync worked fine.
I googled failed to create repository and ended up here.
My problem was that the description for my new repo was too long. There is a charlimit for the description, but GitHub tried to push it anyway and failed.
I just had the same problem, tried some of the suggestions on this post but none worked so what i did was, on the GiTHub client i went to tools -> settings and then click on the section where it says add/create default ignored files. Then hit Update and try to commit again through the client.
It happend to me when my project was opened in an IDE (Netbeans in my case), make sure non of the files you're about to commit isn't open in some program.
I checked the log file at C:\Users{user}\AppData\Local\GitHub\TheLog.txt and found this error:
LibGit2Sharp.LibGit2SharpException:
Could not open 'SomePath\SomeProject.opensdf':
The process cannot access the file because it is being used by another process.
I closed Visual Studio and the commit was then created successfully.
n.b. I removed actual file path in the above error.
If you are new user make sure that you have confirmed your e-mail. Had same problem and confirmation fixed it!
You can manually navigate to index.lock which is found inside the hidden .git folder of your repository location. Once you delete index.lock you will be able to commit as per usual.
The easiest way to navigate to the folder will be to click on the folder breadcrumbs inside windows explorer and add \.git and press enter.
Just delete 'index.lock' in the '/.git/' directory. Solved the problem for me instantly.
I had this happen to me and this is the easiest way to fix it:
Make a copy of your local folder that has the repo and remove the .git folder form it.
Delete the original repo folder with files.
Re-clone the repo from GitHub with the Windows client.
Delete all of the files that get cloned except for the .git folder.
Copy all files from the copied folder into the new clone folder.
Add in your commit notes and the commit should work this time.
I had the same problem and I fixed it by renaming one of the file because its name was too long. This fixed the problem.
Here is error message from git shell:
fatal: unable to stat 'plugins/com.napolitano.cordova.plugin.intent/example/app/platforms/android/CordovaLib/build/intermediates/classes/debug/org/apache/cordova/NativeToJsMessageQueue$OnlineEventsBridgeMode$OnlineEventsBridgeModeDelegate.class': Filename too long
I REBOOTED my Windows 7 machine and tried again - IT WORKED!
I had the "Commit failed: Failed to create a new commit" and tried to delete the index or index.lock file via windows command prompt and that didn't work. I deleted it via windows explorer, that didn't work.
I tried to check credentials like another reply in this list said, but couldn't figure it out and the credentials seemed 'ok.' So - I rebooted. Viola.
I'm not sure this will help anyone, I'm not all that great w/ this stuff, but trying.
I deleted ".git" in children directory and the problem was resolved.
It happened to me once ,I had a empty repository inside of the repository that I cloned.
It was a silly mistake though but could happen .