Archive for the ‘DVCS – Distributed Version Control’ Category
Posted by jpluimers on 2016/09/10

Oh, shit, git. For +Tatiana Azundris, Originally shared by Stefani Banerian
Source: Kristian Köhntopp – Google+
Oh, shit, git!
Oh shit, git! Git is hard: screwing up is easy, and figuring out how to fix your mistakes is fucking impossible. Git documentation has this chicken and egg problem where you can’t search for how to get yourself out of a mess, unless you already know the name of the thing you need to know about …
Right now the site is down from Amsterdam; luckily we have http://web.archive.org/web/20160909123413/http://ohshitgit.com/
If you’re fast, you might see http://ohshitgit.com redirect to http://ohshitgit.com/cgi-sys/suspendedpage.cgi which shows:
The website you were trying to reach is temporarily unavailable.
Please check back soon.
If you are the owner of this website, please contact Technical Support as soon as possible.
–jeroen
Image source: xkcd: Git [WayBack] via Christian Vogel [WayBack]
Posted in Development, DVCS - Distributed Version Control, git, Source Code Management | Leave a Comment »
Posted by jpluimers on 2016/09/07
Yes, people still do this: Screenshot 2016-09-07 15.59.24.png
This one is worse than the usual “Yes/No” questions missing one or more of the “Yes” or “No” buttons in that it actually mentions you can click “No”.
Load SSH Key?
Do you have an SSH kkey that you’d like to load now? If not you can click “No” and create one later if you like”.

Posted in DVCS - Distributed Version Control, git, Mercurial/Hg, Software Development, SourceTree | Leave a Comment »
Posted by jpluimers on 2016/09/01
Sometimes your latest commit isn’t what you intended. Fixing can be done, but isn’t always obvious hence these links:
Remove a new file from a commit:
cp somefile.txt somefile.txt.bak
hg forget somefile.txt
hg commit --amend
If the file was new (i.e. you had used hg add).
If that file already existed try:
cp somefile.txt somefile.txt.bak
hg revert somefile.txt --rev .~1
hg commit --amend
cp somefile.txt.bak somefile.txt
–jeroen
Posted in Development, DVCS - Distributed Version Control, Mercurial/Hg, Software Development, Source Code Management | Leave a Comment »
Posted by jpluimers on 2016/08/23
I use “git mv” a lot because somehow it works a lot better than having git automagically find out about renames.
The problem with “git mv” is that the “fatal: bad source” errors are a catch-all for many causes. Just look at the
Searching for “git mv” directory “fatal: bad source” didn’t get me much further. The one link that did get me towards the right track is version control – Getting Git to follow renamed and edited files – Stack Overflow.
What happened was that I had manually deleted and edited some files as part of a mass script (the repository had a lot of files in it that didn’t belong there compile targets and user specific settings or didn’t adhere to the naming conventions) before executing the “git mv”.
Since “git mv” tries to administer all the files that it thinks originally were in the directory, it complains about those files.
Lesson learned: first “git mv” then perform other changes.
–jeroen
Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management | Leave a Comment »
Posted by jpluimers on 2016/07/27
Just what I needed: Push a new local branch to a remote Git repository and track it too – Stack Overflow But watch the comments to this answer:
Answer:
In recent versions of Git (1.7.0 and later), you can checkout a new branch:
git checkout -b <branch>
Edit files, add and commit. Then push with the -u option:
git push -u origin <branch>
Git will set up the tracking information during the push.
Daniel Ruoso / Dan
Comments:
–jeroen
Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management, Visual Studio 2013, Visual Studio 2014, Visual Studio 2015, Visual Studio and tools | Leave a Comment »
Posted by jpluimers on 2016/07/06
via: Lesson Learned – I Can’t Get My Git Repo Clean! | DrupalEasy
One file kept getting added to the git modified list: service/src/main/MySOAPdefinition.pas.
It was part of a repository that had been migrated from SVN (more on that in a future blog post) and along the way been renamed in directory service/src/main from MySOAPdefinition.pas to MySoapDefinition.pas. SVN (and TortoiseSVN) don’t object to this. But git does.
You’d see this on the command-line:
>git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git checkout -- ..." to discard changes in working directory)
modified: service/src/main/MySOAPdefinition.pas
no changes added to commit (use "git add" and/or "git commit -a")
>git add service\src\main\MySoapDefinition.pas
>git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git checkout -- ..." to discard changes in working directory)
modified: service/src/main/MySOAPdefinition.pas
no changes added to commit (use "git add" and/or "git commit -a")
Basically the add would do nothing.
On Windows, this is how to get around this:
Read the rest of this entry »
Posted in Delphi, Delphi XE8, Development, git, Mac OS X / OS X / MacOS, OS X 10.9 Mavericks, Power User, Software Development, Source Code Management, SourceTree, Windows, Windows 7 | 1 Comment »
Posted by jpluimers on 2016/07/05
Not on the terminal, but only in SourceTree I got this error (full text below):
Can't locate SVN/Core.pm in @INC
Well, the Xcode binaries were here:
$ xcode-select -p
/Applications/Xcode.app/Contents/Developer
On Mavericks, perl is this version:
$ perl --version | grep -w for
This is perl 5, version 16, subversion 2 (v5.16.2) built for darwin-thread-multi-2level
(with 3 registered patches, see perl -V for more detail)
and git is this:
$ git --version
git version 1.9.5 (Apple Git-50.3)
Steps for fixing are at these blog entries:
All these solutions point you to change the system Perl installation, but since on my system it failed only on SourceTree, but from the terminal, I wanted to fix SourceTree.
Read the rest of this entry »
Posted in Apple, Development, DVCS - Distributed Version Control, git, Mac OS X / OS X / MacOS, OS X 10.9 Mavericks, Power User, Source Code Management, Subversion/SVN | 4 Comments »
Posted by jpluimers on 2016/06/28
At first you’d think that gists can only hold text files. That’s not true, and I hinted to this last week in Hosting an HTML gist containing JavaScript.
As gists are git repositories, you can put any file in it through git, even binary files, though the gist UI nor a lot of the tools – including gist(1) – support uploading binary files in a gist.
This post – though old, so the screenshots are not current any more, but the commands still are current – explains how to clone the gist and add binaries (in this case images): How To Upload Image / Binary File to Gist | Hanxue and IT
This is for instance how I created a gist containing openssl Darwin binaries to help solve https://github.com/drwetter/testssl.sh/issues/362.
–jeroen
Posted in Development, DVCS - Distributed Version Control, gist, git, GitHub, Source Code Management | Leave a Comment »
git push -uwas introduced in Git 1.7.0 (2010-02-12). – Chris Johnsen Jun 4 ’11 at 4:16-uis short for--set-upstream—for what it does and why it’s needed I wouldn’t mind some explanation, too. :) – Anton Strogonoff Mar 9 ’14 at 6:07push.defaultis set toupstream, this will not do what you think it will do. It will try to push over the existing tracking branch. Use:git push -u origin mynewfeature:mynewfeatureor dogit branch --unset-upstreamfirst. – void.pointer May 19 ’14 at 18:07