The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for the ‘SourceTree’ Category

Installing SourceTree 3.x for Windows on an air-gapped machine

Posted by jpluimers on 2020/03/11

Since the “account.json” SourceTree search did not help me much, below are the steps for installing SourceTree for Windows 3.x on an air-gapped machine.

Prerequisites:

Steps:

  1. Run Process Explorer on the target system
  2. Run the SourceTreeSetup installer on the target system
  3. When registering, click on the “BitBucket” button on the target system
  4. In Process Explorer, find out the web browser process that the setup kicks off and grab the command-line, which looks like this when running Chrome as default browser:
    "%LocalAppData%\Google\Chrome\Application\chrome.exe" -- "https://bitbucket.org/site/oauth2/authorize?response_type=code&client_id=123456789012345678&state=authenticated&redirect_uri=http://localhost:34106/"
  5. Copy the URL bit https://bitbucket.org/site/oauth2/authorize?response_type=code&client_id=123456789012345678&state=authenticated&redirect_uri=http://localhost:34106/ over and paste it on a machine that has internet access
  6. Logon, and follow the steps until the URL look like this: http://localhost:34106/?state=authenticated&code=876543210987654321
  7. Copy that URL over to a web-browser on the target system and execute it
  8. Finish the installation steps on the target system

Now a new file should be in %LocalAppData%\Atlassian\SourceTree\accounts.json suitable for SourceTree 3.x. In the future you might be lucky enough to copy that to a target system before installing.

I was not so lucky, because my accounts.json was SourceTree 2.x based, which the SourceTree 3.x setup modifies, but is still not happy with.

Note these number differ on each request:

  • 123456789012345678 is a base64 encoded request ID
  • 876543210987654321 is a base64 encoded response ID
  • 34106 is a random TCP port where the installer is listening on to get the authentication information

Fiddler

Initially, I had Fiddler steps in the above, but found out I did not need those. One thing that complicated this is that Fiddler had been removed from Chocolatey for a while, so I was not sure it would stay as a product:

SourceTree

Now has an MSI installer:

Has old steps for 2.x versions to get around the above hoopla:

–jeroen

Posted in Development, DVCS - Distributed Version Control, Software Development, Source Code Management, SourceTree | Leave a Comment »

Fork – a fast and friendly git client for Mac

Posted by jpluimers on 2019/09/24

Works for Windows too: [WayBack] Fork – a fast and friendly git client for Mac.

Via [WayBack] Weekend Reader 2017.46 – reality-loop(who switched away from SourceTree, because, well, that was ahead of it’s time but in the end couldn’t keep up with reality)

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, git-fork, Software Development, Source Code Management, SourceTree | Leave a Comment »

How can I rename a git stash? – Stack Overflow

Posted by jpluimers on 2019/03/07

SourceTree does not like it when by accident two git stash entries have exactly the same name.

To work around that, you have to rename one.

The easiest way to do this is on the console using the tips from [WayBack] How can I rename a git stash? – Stack Overflow (thanks [WayBack] qzb):

$ git stash list
stash@{0}: WIP on master: Add some very important feature
stash@{1}: WIP on master: Fix some silly bug

First, you must remove stash entry which you want to rename:

$ git stash drop stash@{1}
Dropped stash@{1} (af8fdeee49a03d1b4609f294635e7f0d622e03db)

Now just add it again with new message using sha of commit returned after dropping:

$ git stash store -m "Very descriptive message" af8fdeee49a03d1b4609f294635e7f0d622e03db

And that’s it:

$ git stash list
stash@{0}: Very descriptive message
stash@{1}: WIP on master: Add some very important feature

This solution requires git 1.8.4 or later, and yes, it works with dirty working directory too.

Some other useful git stash commands:

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management, SourceTree | Leave a Comment »

Where does my git question go? – Programmers Meta Stack Exchange

Posted by jpluimers on 2018/11/20

StackOverflow / StackExchange is growing too large:

You’ve got a question about git. Its not uncommon, lots of people have questions about git. But where should the question be asked?

Source: Where does my git question go? – Programmers Meta Stack Exchange

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, GitHub, Opinions, Pingback, Software Development, Source Code Management, SourceTree, Stackoverflow | Leave a Comment »

When git fails to `fetch all`

Posted by jpluimers on 2018/10/26

“fetch all”

A SourceTree fetch all actually comes down to this:

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch --tags origin

Despite being such a big command-line, it sometimes doesn’t find new remote branches and you end up with a situation like this:

Read the rest of this entry »

Posted in Development, DVCS - Distributed Version Control, git, Source Code Management, SourceTree | Leave a Comment »

Using BC4 OSX with Version Control Systems

Posted by jpluimers on 2017/08/10

A great thread about Using BC4 OSX with Version Control Systems, -Tools and IDEs.

Some highlights:

–jeroen

Posted in Beyond Compare, CVS, Development, DVCS - Distributed Version Control, git, Mercurial/Hg, Power User, Software Development, Source Code Management, SourceTree, Subversion/SVN, TFS (Team Foundation System) | Leave a Comment »

Since the latest 1.9.x is still more stable than 2.0.x, the direct download links

Posted by jpluimers on 2017/06/01

[MementoWeb.org] https://downloads.atlassian.com/software/sourcetree/windows/SourceTreeSetup_1.9.13.7.exe

via:

WayBack https://www.sourcetreeapp.com/update/windowsupdates.txt

Similar to Downgrading to SourceTree 1.5.x from 1.6.x, but keeping up with the youngest embedded Git and Mercurial.

–jeroen

Posted in Development, DVCS - Distributed Version Control, Source Code Management, SourceTree | Leave a Comment »

Gitkraken – free and commercial edition to raise funds for diabetes

Posted by jpluimers on 2017/02/10

This is a good idea. This software company has a free and commercial edition of their product. The paid version helps to raise funds for Diabetes… – Warren Postma – Google+

I didn’t know about this. When SourceTree doesn’t improve, I might try it one day.

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, GitKraven, Mercurial/Hg, Source Code Management, SourceTree | 1 Comment »

Interactive Rebase with SourceTree – via: Atlassian Blogs

Posted by jpluimers on 2017/01/24

Interesting read:

SourceTree is the middleman between you and Git, making it really easy to change your commit history through a simple user interface. You can drag and drop commits to reorder them or squash them, you can delete commits, reword the commit messages, edit them, or just leave them be.

More details at Atlassian Blogs: Interactive Rebase with SourceTree

Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management, SourceTree | Leave a Comment »

configure SourceTree to perform git rebase by default

Posted by jpluimers on 2017/01/23

There is a great description for Windows users at: the urban canuk, eh: Configure SourceTree to Rebase by default

Note that this is a global setting for git (which you can override each time you do a pull). So there is no way to differentiate this by repository.

The screenshots for Mac OS X users to configure SourceTree to perform git rebase by default are these:

Read the rest of this entry »

Posted in Development, DVCS - Distributed Version Control, git, Source Code Management, SourceTree | Leave a Comment »