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,878 other followers

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 »

 
%d bloggers like this: