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,854 other subscribers

Archive for the ‘Source Code Management’ Category

mercurial strip – Remove experimental branch – Stack Overflow

Posted by jpluimers on 2016/06/12

I found a working solution here.It works by using hg strip from the mq extension:$ hg strip my_pruned_branchAs mentioned in the comments, this should only be used for unpublished changesets.

Source: mercurial – Remove experimental branch – Stack Overflow

You need mercurial strip for that which ships with Mercurial 2.8 and up but isn’t enabled by default.

Enabling is easy and can be done globally or on a per-repository base which I like better: just edit your .hg/hgrc file inside your repository and add these lines:

[extensions]
strip =

The source StripExtension – Mercurial forgets to mention you can enable this on a repository base.

I used it to delete an experimental branch that I hadn’t yet pushed to the outside world.

–jeroen

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

git – How to undo the last commit? – Stack Overflow

Posted by jpluimers on 2016/05/31

Always handy to have at hand as the git-reset documentation is toooooo long:

Undo a commit and redo

$ git commit ...              (1)
$ git reset --soft HEAD~1     (2)
<< edit files as necessary >> (3)
$ git add ....                (4)
$ git commit -c ORIG_HEAD     (5)
  1. This is what you want to undo
  2. This is most often done when you remembered what you just committed is incomplete, or you misspelled your commit message1, or both. Leaves working tree as it was before “commit”.
  3. Make corrections to working tree files.
  4. Stage changes for commit.
  5. Commit the changes, reusing the old commit message. reset copied the old head to .git/ORIG_HEADcommit with -c ORIG_HEAD will open an editor, which initially contains the log message from the old commit and allows you to edit it. If you do not need to edit the message, you could use the -C option instead.

–jeroen

via: git – How to undo the last commit? – Stack Overflow.

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

Git: See my last commit – the forrest and the trees – Stack Overflow

Posted by jpluimers on 2016/05/25

There are so many ways to view the last Git commit on the command-line.

On the one hand this shows the versatility of Git. On the other hand there are so many trees in the forrest, that it is hard for people to find how to do simple things.

The one I like most is this:

git show --name-status --oneline

Others:

git log --name-status HEAD^..HEAD
git log -1
git show
git diff
git show --name-status
git log --stat -n 1

–jeroen

via: Git: See my last commit – Stack Overflow.

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

git-extras/Commands.md at master · tj/git-extras

Posted by jpluimers on 2016/03/15

[WayBack] git-extras is awesome: it adds many [WayBack] useful commands to git. Like [WayBack] git ignore and [WayBack] git-info.

For instance, this adds README.md~ to the .gitignore file:

git ignore README.md~

It makes command-line git much more usable, even so much that it lessens the needs of SourceTree and other UIs tools.

You can get it at the GitHub repository [WayBack] tj/git-extras.

Lots of help is at [WayBack] git-extras/Commands.md: it explains all the commands that git-extras adds.

Thanks [WayBack] nifr for posting about git-extras at [WayBack] Is there an ignore command for git like there is for svn? – Stack Overflow.

–jeroen

 

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

Some more tf.exe related batch files for managing workspaces – via: Find an installed tf.exe, then run it with the command-line parameters specified. « The Wiert Corner

Posted by jpluimers on 2016/01/28

As part of some TFS related posts, I wrote about Find an installed tf.exe, then run it with the command-line parameters specified.

Below are some more batch files related to this. In each batch file, you can replace tf with call "%~dp0tf.bat" so the above batch file is executed first.

Read the rest of this entry »

Posted in Batch-Files, Development, Scripting, Source Code Management, TFS (Team Foundation System) | Leave a Comment »

Handy new tool: GitHub Contributions Archive based on the GitHub Archive providing your github history

Posted by jpluimers on 2016/01/05

The GitHub Contributions Archive is based on the GitHub Archive (see below) and provides insight in anyones contributions. I discovered through a recent post by Ilya Grigorik:

Handy new tool (built on top of githubarchive.org dataset!) that aggregates all of your GitHub activity: bit.ly/1mraQyT.Apparently I’ve contributed to… – Ilya Grigorik – Google+

The GitHub Archive is amazing as it provides way more history than Github does by itself:

GitHub Archive is a project to record the public GitHub timeline, archive it, and make it easily accessible for further analysis.

Researching that data can provide tons of information, for instance about behaviour. It is also available through Google BigQuery so you can write your own queries for it.

The GitHub Contributions Archive – built by Liam Bowen – provides one (very usable) kind of insight: contributions, but there is much much more as quite some research, visualizations and talks have shown.

Interesting stuff!

–jeroen

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

Mac OS X: integrating Beyond Compare 4 into SourceTree 2.x

Posted by jpluimers on 2015/12/28

Unlike SourceTree for Windows, SourceTree for Mac still doesn’t automagically detect Beyond Compare even though that has been available for Mac OS X since :  [SRCTREE-2092] Add built-in support for Beyond Compare version 4 – Atlassian JIRA.

Even modifying my ~/.gitconfig didn’t work, but manual configuration did. Here are the steps:

  1. Start the UI version of Beyond Compare
  2. Select the Beyond Compare menu, install the command-line tools
    Read the rest of this entry »

Posted in Apple, Beyond Compare, Development, DVCS - Distributed Version Control, Keyboards and Keyboard Shortcuts, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, OS X 10.10 Yosemite, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, Power User, Source Code Management, SourceTree | 3 Comments »

Resolving “Unknown SSL protocol error in connection to bitbucket.org:443”

Posted by jpluimers on 2015/11/24

A while ago, I had this error on BitBucket:

Running git.exe with arguments "fetch --prune" failed with return code 128 and error output: "fatal: unable to access 'https://%account%@bitbucket.org/%user%/%repository%.git/': Unknown SSL protocol error in connection to bitbucket.org:443

A quick search for “Unknown SSL protocol error in connection to bitbucket.org:443” pointed me to a comment by Ludwik Trammer on an answer by Jordfräs:

I resolved the issue by upgrading from git 1.8 to git 2.0.

Which reminded me this was a Windows system, where there is no package manager that verifies how far your non-system software is behind.

One day, I will write a script that finds out about the git version history and inform me of major/minor versions I’ve skipped.

Some notes for that:

Probably I will need to do something similar for Mercurial/hg in the future as well.

–jeroen

via: git – Unknown SSL protocol error in connection – Stack Overflow

Posted in Development, DVCS - Distributed Version Control, git, Power User, Software Development, Source Code Management, Windows, Windows 7, Windows 8, Windows 8.1, Windows 9, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2 | Leave a Comment »

c# – TFS Code Reviews – Show updated files in response to comments – Stack Overflow

Posted by jpluimers on 2015/11/10

Nice steps here: c# – TFS Code Reviews – Show updated files in response to comments – Stack Overflow.

What’s missing here is that you now loose your history within the shelve-set.

That makes it harder for the reviewer to view the changes being re-reviewed.

–jeroen

Posted in Development, Software Development, TFS (Team Foundation System), Visual Studio 2010, Visual Studio 2013, Visual Studio 2014, Visual Studio and tools | Leave a Comment »

Collection of cool hidden (and not so hidden) features of Git and GitHub:… – via G+ Ilya Grigorik

Posted by jpluimers on 2015/10/20

Thanks Ilya Grigorik for sharing this which I found back recently:

Collection of cool hidden (and not so hidden) features of Git and GitHub.

GitHub Cheat Sheethttp://git.io/sheet

–jeroen

via: Collection of cool hidden (and not so hidden) features of Git and GitHub:….

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