question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dirty index warning from aborted force push

See original GitHub issue

Not sure if this is a one-off or if there may be a bug buried in here, but these are the steps which led to a “dirty index” warning. Note: I had a LFS file in my commits, which was unintentional.

  • Have a LFS file committed
  • Get into a force push with lease state
  • Click the force push button, wait for it to fail
  • State reverts back to Push origin with rebase
  • Cannot commit files due to “dirty index” as DS Store file present
  • Fixed with git rebase --abort
install.ts:31 Executing push: git -c credential.helper= -c protocol.version=2 push origin testPR:testPR --force-with-lease --progress (took 209.624s)
install.ts:23 `git -c credential.helper= -c protocol.version=2 push origin testPR:testPR --force-with-lease --progress` exited with an unexpected code: 1.
Enumerating objects: 171, done.
2install.ts:31 [AppStore.withAuthenticatingUser] account found for repository: TestWebAppProject - tierninho (has token)
install.ts:31 [AppStore.withAuthenticatingUser] account found for repository: TestWebAppProject - tierninho (has token)
2install.ts:31 [AppStore.withAuthenticatingUser] account found for repository: TestWebAppProject - tierninho (has token)
install.ts:31 Executing pull: git -c credential.helper= -c protocol.version=2 pull --recurse-submodules --progress origin (took 9.440s)
install.ts:23 `git -c credential.helper= -c protocol.version=2 pull --recurse-submodules --progress origin` exited with an unexpected code: 1.
First, rewinding head to replay your work on top of it...

fatal: Dirty index: cannot apply patches (dirty: .DS_Store TestWebAppProject/Controllers/HomeController.cs sdfsd)

error @ install.ts:23
git @ core.ts:171
_tickCallback @ internal/process/next_tick.js:68
async function (async)
git @ core.ts:107
pull @ pull.ts:100
async function (async)
pull @ pull.ts:57
gitStore.performFailableOperation @ app-store.ts:2895
performFailableOperation @ git-store.ts:729
withPushPullFetch @ app-store.ts:2893
async function (async)
withPushPullFetch @ app-store.ts:2821
withPushPullFetch @ app-store.ts:2801
performPull @ app-store.ts:2821
withAuthenticatingUser @ app-store.ts:2812
withAuthenticatingUser @ app-store.ts:3903
_pull @ app-store.ts:2811
pull @ dispatcher.ts:334
PushPullButton.performAction @ push-pull-button.tsx:265
ToolbarButton.onClick.event @ button.tsx:111
Button.onClick.event @ button.tsx:147
callCallback @ react-dom.development.js:100
invokeGuardedCallbackDev @ react-dom.development.js:138
invokeGuardedCallback @ react-dom.development.js:187
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:201
executeDispatch @ react-dom.development.js:466
executeDispatchesInOrder @ react-dom.development.js:488
executeDispatchesAndRelease @ react-dom.development.js:586
executeDispatchesAndReleaseTopLevel @ react-dom.development.js:597
forEachAccumulated @ react-dom.development.js:567
runEventsInBatch @ react-dom.development.js:728
runExtractedEventsInBatch @ react-dom.development.js:737
handleTopLevel @ react-dom.development.js:4201
batchedUpdates @ react-dom.development.js:12537
batchedUpdates @ react-dom.development.js:1939
dispatchEvent @ react-dom.development.js:4282
interactiveUpdates @ react-dom.development.js:12592
interactiveUpdates @ react-dom.development.js:1958
dispatchInteractiveEvent @ react-dom.development.js:4259
install.ts:23 `git commit -F -` exited with an unexpected code: 1.
On branch testPR
Your branch and 'origin/testPR' have diverged,
and have 64 and 2 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)

You are currently rebasing branch 'testPR' on '1074d88'.

nothing to commit, working tree clean

(The error was parsed as 17: There are no changes to commit.)

8b061eac07, mac

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
shiftkeycommented, Apr 17, 2019

I’m going to close this out for the moment because this has been an isolated report, and a future upgrade to dugite will add the new error code from https://github.com/desktop/dugite/pull/320 and need to be handled in Desktop, which has the context around where it should be handled.

I’m also not aware of other reports about this error, so I’m not sure how easy it is to reproduce:

install.ts:23 `git commit -F -` exited with an unexpected code: 1.
On branch testPR
Your branch and 'origin/testPR' have diverged,
and have 64 and 2 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)

You are currently rebasing branch 'testPR' on '1074d88'.

nothing to commit, working tree clean

(The error was parsed as 17: There are no changes to commit.)
0reactions
lilgurlcommented, Oct 31, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

git - How do I solve a dirty index in Eclipse? - Stack Overflow
The index is the place in git where you register the changes you want to include in your next commit (via git add...
Read more >
git-reset Documentation - Git
Resets the index and updates the files in the working tree that are different between <commit> and HEAD , but keeps those which...
Read more >
EGit/User Guide - Eclipsepedia
In this specific example, there is a warning message that there are several branches that use the remote named "origin". This means that...
Read more >
10 things I hate about Git - Steve Bennett blogs
Now Git: you have files, a working tree, an index, a local ... Push your new branch ('git push origin my-new-branch') and log...
Read more >
Dirty Dancing (1987) - Trivia - IMDb
To address this, Eleanor Bergstein and Emile Ardolino forced the stars to re-watch their initial screen-tests, the ones with the "breathtaking" chemistry.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found