youngmon/atlassian-qna huggingface dataset:
How do I undo a checkout?
Asked by Jeffrey_Bertrand:

I have very little experience with SourceTree. I had a branch I was working on and while looking back I hit checkout on it (hindsight no idea why). Anyway I can't see my most recent commits.. Is there a way I can go back?


Answers:
author: Bal?zs Szakm?ry
body: This solution from StackOverflow is probably wrong, you just have to check out the branch where you made the commits originally. (Double-click the branch name.)


author: Jeffrey_Bertrand
body: Nevermind. Found a solution: <http://stackoverflow.com/questions/7263924/git-checkout-reverted-code-to-older-commit-how-to-revert-back>.


Tags: check-out
In Source Tree, when a new directory is added it is not recognized.
Asked by mark white:

With 1.6.13 version of source tree loaded, if a directory(with file within) is added, source tree doesn't recognize it. Deleting a directory from the same repository DOES WORK...any clues?


Answers:
author: mark white
body: It turns out that the drop down setting in the staged file section was set to "Modified" instead of pending.

When set to modified, ONLY existing modified files will show, not new ones..


author: Seth
body: Check your .gitignore files.

<http://git-scm.com/docs/gitignore>
Source Tree fails to commit on windows
Asked by blumbergrotem:

I am encountering a problem that whenever I try to commit I get an error:

git -c diff.mnemonicprefix=false -c core.quotepath=false commit -q -F C:\\Users\\username\\AppData\\Local\\Temp\\2\\dxy1tg2p.vfr

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags --set-upstream origin "(detached from someKindOfID):(detached from someKindOfID)"

Pushing to :"RepositoryURL"

fatal: remote part of refspec is not a valid name in (detached from someKindOfID):(detached from someKindOfID)

Unexpected end of command stream.

This happened to me after I have checked out the source.

this seems to be a duplicate of <https://answers.atlassian.com/questions/104657> but this issue was on macOS(and so the given solution) and mine is on windows.

also there is an unanswered StackOverflow answer here: <http://stackoverflow.com/questions/22058684/git-is-failing-to-stage-or-commit-with-sourcetree-in-a-windows-network-environm> .

any help would be appreciated.


Answers:
author: Bal?zs Szakm?ry
body: From the "detached from someKindOfID" it seems that you are trying to commit without being on a branch.

Double-click the name of the branch you are supposed to be on to check out the branch and try again.

comments: author: blumbergrotem
body: Thank you very much Szakmary thanks for clarifying that(I am quite new to source tree), this solved my problem.


author: api-labs
body: Doing this killed my stuck commit... the damned thing is nowhere to be found...


Tags: bitbucket-cloud

cloud

commit
How to keep repo local only
Asked by ArgTang:

If i hava a repo that i dont want to push out in the wild, Can i prevent it from pushin into the internet?


Answers:
author: Cesare Jacopo Corzani
body: If your repository is hosted using bitbucket you can simply go to the setting page on bitbucket website and put it as private repository.


author: Cesare Jacopo Corzani
body: You can check from the shell your upstreams:  

```
git remote -v
```

the output will be something like:

```
origin    https://user@bitbucket.org/user/demo.git/wiki (fetch)origin    https://user@bitbucket.org/user/demo.git/wiki (push)
```

So it will be:

```
git remote rm origin
```

comments: author: Cesare Jacopo Corzani
body: or you can simply copy your project in a new folder and "git init". That project will be just local until you add a new upstream. With this method you will lose the previous commit history.
Pull error false fetch
Asked by Esat Ceyhan:

Hey this is what i get when i try to pull.

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch ''Name''

git -c diff.mnemonicprefix=false -c core.quotepath=false pull ''Name'' master  
fatal: Couldn't find remote ref master

Unexpected end of command stream

Completed with errors, see above.


Answers:
author: rahuldanwade
body: Hi Escat,

Have you entered URL for repository correctly in ?

To fix it, you'll have to edit your .git/config file and change the URL to the proper one.

comments: author: Esat Ceyhan
body: Hi thanks for your response,My config file looks like this_____________________name = email = \[core\]excludesfile = C:\\\\Users\\\\\[Computer name\]\\\\Documents\\\\gitignore_global.txt_____________________


author: Seth
body: Do you have a remote? Pulling and pushing are operations that interact with remote repositories (most commonly github or bitbucket). If you don't have one, you have no reason to be pushing that button.


author: Esat Ceyhan
body: Hi thanks for your response,

My config file looks like this

_____________________

name =   
email =   
\[core\]  
excludesfile = C:\\\\Users\\\\\[Computer name\]\\\\Documents\\\\gitignore_global.txt

_____________________
Sourcetree SSH OS X
Asked by S Prim:

I'm trying to connect to GitHub through [S](http://www.sourcetreeapp.com/)ourceTree on OS X using SSH. Even though I can connect fine command line, I can't seem to work with any repo through SSH in SourceTree with the error:
> Permission denied (publickey).

All the help topics I have found online suggest configuring the SSH client in SourceTree. However, all of that documentation seems to be for the Windows version (Tools-\>Options or something). **How can I access the SSH Preferences on the OS X version of SourceTree?**


Answers:
author: Timothy
body: I don't think that you do that on the Mac OS. This might give you some insight (<https://confluence.atlassian.com/pages/viewpage.action?pageId=270827678>).

comments: author: S Prim
body: Yeah, that doesn't really address my situation. My situation is specific to SourceTree. If I take the Git command that SourceTree is failing on and run it command line, it works fine.
How can I rebase in Mercurial repos?
Asked by Kaz:

I would like to rebase revisions in a Mercurial repo but the Rebase menu item is grayed out. I enabled the Mercurial rebase extension in my user configuration. What is the requirements to use Rebase in SourceTree for Mercurial repos?


Answers:
author: Mike Schilder
body: same question


author: Max Smad
body: Same question
Question about push in GUI
Asked by Greg Silverman:

Sometimes sourcetree visually indicates that I have commits to push, but, I have no commits since my last pull. Does pull-ing cause this? Is this a bug in sourcetree? The git command line tools do not indicate I have anything to push.


Answers:
author: Seth
body: If you had commits that needed pushed before you pulled, they will still need pushed after. Additionally, if the pull created a merge commit, that will need pushed as well. If both situations apply, only one push is needed.


author: Greg Silverman
body: Yes, the pull did result in a merge.


author: Seth
body: If you could get a screenshot, that'd be helpful. Pulling shouldn't cause SourceTree to think you need to push, unless you committed before the pull, and the pull resulted in a merge or rebase.
What do they symbols in a commit message panel mean?
Asked by Greg Silverman:

When viewing commit messages in SourceTree there is always a symbol in the upper right hand corner of that pane. What does it mean? What does it's color mean?


Answers:
author: Seth
body: It's an [identicon](http://scott.sherrillmix.com/blog/blogger/wp_identicon/). If you don't want to clickthrough, it's a geometric pattern generated by the string representing the commit author (i'm not sure if it is the full author name, or just the email).
Sourcetree doesn't launch
Asked by Vincent Dupuy:

The exe doesn't launch and I can't uninstall it. What do I need to do ?


Answers:
author: Vincent Dupuy
body: Nom de l'application d?faillante SourceTreeSetup_1.6.13.exe, version : 1.6.13.0, horodatage : 0x54c8c1b5  
Nom du module d?faillant : SourceTreeSetup_1.6.13.exe, version : 1.6.13.0, horodatage : 0x54c8c1b5  
Code d'exception : 0xc0000417  
D?calage d'erreur : 0x000c69d1  
ID du processus d?faillant : 0x112c  
Heure de d?but de l'application d?faillante : 0x01d046050ebfe45b  
Chemin d'acc?s de l'application d?faillante : C:\\Users\\Vincent\\Downloads\\SourceTreeSetup_1.6.13.exe  
Chemin d'acc?s du module d?faillant: C:\\Users\\Vincent\\Downloads\\SourceTreeSetup_1.6.13.exe  
ID de rapport : 4c9c1fcd-b1f8-11e4-beda-08606e102980  
Nom complet du package d?faillant :


author: Vincent Dupuy
body: When I launch the .exe I have an Application Error ID 1000 (100) in the system event / error log. What is it ?  

Ty for your help

comments: author: Nic Brough -Adaptavist-
body: It's a very generic (and typically for windows, utterly useless) error message that means "the application crashed". We can't do much with that.Best guess is that you're on a version of Windows that can't run Sourcetree, or that the Sourcetree installer you are running is damaged in some way - try re-downloading it?


author: Nic Brough -Adaptavist-
body: Check the system event / error log to see what is going wrong. It might be worth trying to re-install it to see if that helps.
Can we sync remote repository and local repository?
Asked by Jewel Francis:

Hi Team,

I can see that there is an option in source tree to check default remotes for updates. We can even set the time interval as well. This is a very good feature and it will notify the user that he/she require a pull. But my question is, whether this pull can also be done automatically?

i.e. When the remote repo is ahead of the local repo by 'n' number of commits, can we do a git fetch/git pull automatically, similar to the way we receive the notification.

Warm Regards,

-Jewel


Answers:
author: Bal?zs Szakm?ry
body: You cannot do this in SourceTree.

Workaround: write a short script that does a git pull in the right folder and schedule it to run regularly. (Even like this, you need to manually deal with the cases when there are un-pushed local commits or uncommitted changes, because the pull will fail / manual merge will be required.)


author: Seth
body: Few git clients will support automatic pulls, since they change the user's working copy, which can be confusing at best.

What happens if git pulls an update to a file while a user has unsaved changes in their IDE? Depends on the IDE. Some will discard the unsaved changes to load the updated file, some will overwrite the pulled changes when the user saves the IDE's copy that doesn't have those, some will prompt that there is a change. I don't know of any IDE that will merge changes to a local file with unsaved changes in the IDE.
SourceTree Windows - Update Embedded Git Fails 'Unable to extract'
Asked by D K:

Windows 7 SourceTree version 1.6.13.0

Tools \> Options \> Git \> Update Embeded Git Fails with:

PortableGitUnableExtract.png

[](https://community.atlassian.com/t5/Sourcetree-questions/SourceTree-Windows-Update-Embedded-Git-Fails-Unable-to-extract/qaq-p/137873?attachment-id=12097){#link_116a989440b41c}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/4091/1/PortableGitUnableExtract.png){#display_116a989440b41c_0}


Answers:
author: fifthstreet
body: Still a problem trying to get to 2.18.0. Fixed by opening Task Manager and killing ssh. Installed sweetly after that. Insane error on Atlassian's part, moreso that it's gone on so long.

comments: author: Rob Blodgett
body: this worked for me.


author: marchrius
body: Same here. Windows 8.1 and SourceTree 1.7.0.32509

immagineerroresourcetree.jpg

Edit:

Solved with method at <https://jira.atlassian.com/browse/SRCTREEWIN-2962>  
[](https://community.atlassian.com/t5/Sourcetree-questions/SourceTree-Windows-Update-Embedded-Git-Fails-Unable-to-extract/qaq-p/137873?attachment-id=11177){#link_116a98a4e7d3cc}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/4095/1/immagineerroresourcetree.jpg){#display_116a98a4e7d3cc_0}

comments: author: Asbj?rn Mikkelsen
body: still same issue on Sourcetree 2.1.2.5, runnning windows 10.

Killing pageant.exe, ssh-agent.exe, git.exe etc, does not help.

Commented the mentioned issue also.


author: J.R. Heisey
body: Occurs in version 1.6.25.0 with downloaded PortableGit-2.6.1-32-bit.7z.exe

SourceTree.git.update.download.jpgSourceTree.git.update.failed.jpg  
[](https://community.atlassian.com/t5/Sourcetree-questions/SourceTree-Windows-Update-Embedded-Git-Fails-Unable-to-extract/qaq-p/137873?attachment-id=11107){#link_116a98b1620800}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/4094/1/SourceTree.git.update.failed.jpg){#display_116a98b1620800_0}  
[](https://community.atlassian.com/t5/Sourcetree-questions/SourceTree-Windows-Update-Embedded-Git-Fails-Unable-to-extract/qaq-p/137873?attachment-id=11108){#link_116a98b1620800_0}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/4094/2/SourceTree.git.update.download.jpg){#display_116a98b1620800_2}


author: Rahlzel
body: Confirmed on 1.6.20 as well:<http://i.imgur.com/uC2YC9Q.png>


author: D K
body: Created JIRA <https://jira.atlassian.com/browse/SRCTREEWIN-2962>


Tags: windows
Do I need to be running as admin in windows in-case an update comes out?
Asked by Alden Snow:

In what I thought was an upgrade the thing errored out and I had to download and install the app as admin in a new directory.


Answers:
author: Seth
body: Updates to SourceTree should run in a separate process from SourceTree itself, and it should request admin permissions when it runs, if needed.

Did you close SourceTree during the update? If not, that's probably why the update failed.
How to resolve conflicts in a separate commit
Asked by Jason Steenstra-Pickens:

Out project is using a modified version of Git Flow and A Successful Git Branching Model. What usually happens is our tasks are broken down in small pieces and then those are committed to a separate branch for that sub task. We create a pull request to merge those into a feature branch. Eventually the feature branch will be reintegrated into a development branch which contains multiple feature.

When reintegrating a feature branch into a development branch I want to separate non conflicting changes into the first commit (no fast forwards here) and then commit all the conflict resolutions in a separate commit. The purpose of this is so that I don't have to get someone to re-review all the trivial changes, they can just look at the one commit for the conflict resolutions and approve those.

When I try and do this in SourceTree the initial merge operation will stage everything. I then unstage the files with a conflict and commit what is left. The problem is that as soon as the files are unstaged the conflicts are marked as resolved. So to do the second commit I have to manually find the conflict markers and see what to do. It also makes it difficult to launch an external merge tool.

It's been a while since I have used Git from the command line but I thought the conflict was only resolved when it was added? Is there a way to achieve this in SourceTree?


Answers:
author: Jason Steenstra-Pickens
body: I tried various approaches and sort of found a way to do it. There were some changes missing but it may have been because of an invalid conflict resolution.

1. I branched the development branch to a merge branch.
2. Then I merged the feature branch to the development branch and unstaged all files with conflicts.
3. Then I merged the feature branch to the merge branch, unstaged all the files without conflicts, and resolved the ones with conflicts.
4. Finally I merged the merge branch to the development branch, resolving all conflicts using the ones from the merge branch.


author: Bal?zs Szakm?ry
body: There is no Git client that would let you do what you want, because when you are merging, you cannot commit until you have resolved all the conflicts one way or another. Also, If you merge two branches twice, the second merge will not merge anything before the first merge. (=It excludes the files you "resolved" in the first merge by not merging them.)

I guess you do not want to change your workflow. (If you had only one level of feature branches, this whole problem would not exist.)

One thing you could do is to have the review of the conflict resolution at the time when it is happening, i.e. have the reviewer be there when the changes are merged.

Another thing you could do is to resolve the conflicts by merging the development branch into the feature branch first (at this point you have all the feature changes + conflict resolution in the feature branch, this can be reviewed nicely) and only allow clean merges when the feature branch is merged into the development branch. (This is how pull requests work in Stash.)
Is there any payment in SourceTree registration after the trial version was ended?
Asked by Mark Jayson Alday:

My trial version was ended and gives me two options: Import License or Register it. I want to clarify this matter because it was confuse me with the Terms of Use.


Answers:
author: Jeff Thomas
body: Hi Mark,

SourceTree is free, but we just ask that you [register](http://www.sourcetreeapp.com/register/) it after 30 days. There's no payment needed to register it.

Cheers,  
Jeff
Is anyone else unable to use Interactive Rebase on repositories that don't have a remote?
Asked by thinsoldier:

I made a new remote repository on bitbucket, then cloned it locally.

Made 1 commit and pushed the master branch to remote origin and made sure it's tracking origin/master branch.

Made 5 more commits that I did not push to the remote origin.

Tried interactive rebase. The ui appeared as it should.

I then removed the remote.

Tried interactive rebase again. Got the empty window error.

The command history shows:

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree -c sequence.editor='/Applications/SourceTree.app/Contents/Resources/stree_gri' -c core.editor='/Applications/SourceTree.app/Contents/Resources/stree_gri' rebase -i --autosquash   
There is no tracking information for the current branch.  
Please specify which branch you want to rebase against.  
See git-rebase(1) for details

git rebase \<branch\>

If you wish to set tracking information for this branch you can do so with:

git branch --set-upstream-to=\<remote\>/\<branch\> master

...

It seems interactive rebase will only work for repositories that have a remote.

Is that how it should be?


Answers:
author: daniel debela
body: am running into the same issue . were you able to resolve this Derek?


author: Matt C. Wilson
body: Turns out this can be simplified to:

```
git rebase -i <commit>
```


author: Matt C. Wilson
body: This workflow works for me (no remotes needed):

```
git log
```

*to figure out which commit (SHA or count) you want to consider your base*

```
git branch RebaseFixup HEAD~3
```

*create a temp RebaseFixup (or whatever name) branch from your rebase point. e.g. you want to rebase from 4 commits ago, doing pick/squash/fixup/etc on the last 3 commits. Use the SHA instead if you wish.*

```
git rebase -i RebaseFixup
```

*do your rebase*

```
git branch -d RebaseFixup
```

*cleanup the temporary branch*

If anyone finds a better workflow, please also update the StackOverflow question here: <http://stackoverflow.com/questions/30625213/how-do-i-use-gits-interactive-rebase-with-a-local-only-repository-no-remote/30625214#30625214>


author: Derek B
body: I think I am running into this issue as well. Did you ever find out?
"ignore" is now missing
Asked by Joseph Fallon:

The right-click "ignore" menu item is missing in version 1.6.13 of the Windows client. Effectively, the only way to add items to the .gitignore file now is by hand editing it. This is not ok. Please bring it back.


Answers:
author: minnsey
body: Hi,

Unfortunately this is a regression introduced in 1.6.13, completely unintentional and a QA fail on my behalf.

<https://jira.atlassian.com/browse/SRCTREEWIN-2949>

Apologies for this. I'm currently working to get back for you.

comments: author: hmigneron
body: The bug you linked to (<https://jira.atlassian.com/browse/SRCTREEWIN-2949>) is about adding files to the index. The question was about adding to .gitignore, is it the same bug? In any case, I have the same problem on 1.6.13, thanks for keeping us informed on this!


author: hmigneron
body: @Michael Minns thank you so much for fixing this in 1.6.14, this issue was driving me nuts!


author: hmigneron
body: I have the same problem in 1.6.13. The ignore option is no longer in the contextual menu.


author: Joseph Fallon
body: I have attached an image below.


author: Joseph Fallon
body: sourcetree-missing-ignore.png  
[](https://community.atlassian.com/t5/Sourcetree-questions/quot-ignore-quot-is-now-missing/qaq-p/249328?attachment-id=6867){#link_116a9925188cf2}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/7354/1/sourcetree-missing-ignore.png){#display_116a9925188cf2_0}

comments: author: Seth
body: Weird. You can post a bug report to jira.atlassian.com.


author: Seth
body: Works for me. Screenshot?
external merge tool will not start
Asked by Simon Martineau:

Hi,

I can't launch external merge tool from Sourcetree anymore. It might have been broken in the last update, I can't confirm but for sure it has worked before. When I use resolve conflict -\> launch external merge tool, I get the "Visual merge in progress" dialog but it never really launches. I tried to use Beyond compare and araxis merge but I get the same problem with both. I use version 1.6.13.0 of sourcetree. I also tried adding the beyond compare executable to my path but it did not help.

Thank you,

Simon Martineau


Answers:
author: Seth
body: Another user recently discovered in this question that you can not use the external diff tool if the file has been deleted (or renamed) in one of the branches that are being merged: <https://answers.atlassian.com/questions/12258328>

Is this what is happening to you?

comments: author: Simon Martineau
body: Seth, you are right, it is exactly what is happening to me. One file was renamed.

Any idea how to make it work with a renamed file?

I should mention the rename was done properly in git. It is not just a remove and add on a different name.


author: Seth
body: Someone in this bug report was able to do it from the command line: <https://jira.atlassian.com/browse/SRCTREEWIN-1259>Also, does the merge show a conflict on the old name AND an addition for the new name? You might be able to manually diff the files (new name from branch1 and old name from branch2) into the new name, and delete the old one, then mark conflicts as resolved in SourceTree.


author: Simon Martineau
body: The conflict is on the old file name. The result I would expect would be to have all the changes in the new file and not to have the old file. It looks obvious to me but maybe I am dreaming...
how to set PAC proxy settings
Asked by musheer ahmad:

Hi, In our organization we are using pac network. When I open Source tree or Git Bash and checkout, it hangs and after some time gives 443 error.

I have the proxy settings with me, can you please let me know how to use them with Source tree to avoid this issue.

Thanks in advance.


Answers:
author: Timothy
body: I think this will help:

* <https://answers.atlassian.com/questions/14932>

comments: author: musheer ahmad
body: Thanks for the reply Chin, it is resolved for me.

1- Open source tree and navigate to Tools -\> Options

2- Open 'Network' tab

3- Check radio button 'Use custom proxy settings', and configure server address and port number

4- Enable check box 'Add Proxy server configuration to Git / Mercurial'

5- Click ok, and restart source tree,

It should be working now.

Thank you,


author: Bruce Lee
body: Thank you, but in Version 2.0.5.3 (2.0.5.3), where can I find Tools -\> Options?


author: daniel_gutierrez
body: Gracias !.. de 10 !