Details
-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
3.0.12, 3.0.17
-
None
-
- GitHub account (free user, 2-step authenticated)
- Windows 7 Professional 64bit
- SourceTree for Windows 3.0.12
- Git Credential Manager for Windows 1.16.1 (to use 2-step-authed GitHub account on SourceTree)
-
Severity 3 - Minor
Description
Steps to reproduce
- On GitHub, create two private repositories named "repo1" and "repo2" with "Initialize this repository with a README" enabled
- On SourceTree, open new tab and...
- Select "Clone" icon
- Enter https://github.com/<account>/repo1.git to "Source Path / URL:"
- Enter C:\test\repo1 to "Destination Path:"
- "Clone" and wait
- Click "Remote" icon with a red exclamation mark
- "Settings" -> Double-click "origin" line -> "OK" to close remote details -> "OK" to close repository settings
- Confirm the exclamation is removed
- So steps 2-5 ~ 2-7 are just for calming it
- Open new tab and do same except its url/path/name is for repo2
- On SourceTree repo1 tab, right-click the left panel and select "Add Submodule..."
- Enter https://github.com/<account>/repo2.git to "Source Path / URL:" -> "OK"
- "Stage All" and commit with "Push changes immediately to origin/master" enabled
- On local repo1 directory, create "textA.txt"
- On SourceTree repo1 tab, "Stage All" and commit with "Push changes immediately to origin/master" enabled
- Right-click on the second commit (the one when added submodule) and select "Reset current branch to this commit" -> select "Hard" -> "Yes" and confirm "textA.txt" is removed from local repo1
- On local repo1 directory, create "textB.txt"
- On SourceTree repo1 tab, "Stage All" and just commit without "Push changes immediately to origin/master" enabled
- Now the master shows "1↑ 1↓" state
- Select "Push" icon to show push screen
- "Push" master
- Confirm Sourcetree shows error, of cause, then close
- Push again with "Force Push" enabled
- No matter if "Use Safe Force Push" is enabled in SourceTree preference
Expected behavior
- Succeed force-push, or get another error at least
Actual behavior
- Sourcetree shows "Submodule Check" dialog for a split second and returns to push screen (step 12) automatically at once
Handy solution (for users)
- Just push without "Force Push" checked and confirm the error appears
- Copy the first line (Git command) from the error and close
- "Cancel" to close push screen
- Select "Terminal" icon
- Paste the command on terminal, insert "-f" option manually and press enter key
- My case:
git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks -c credential.helper= -c credential.helper="C:/Users/<user>/AppData/Local/ATLASS~1/SOURCE~1/GIT_EX~1/GIT-CR~1.EXE" push -f -v origin master:master
- My case:
- Wait to confirm success and close terminal