The One weird trick for powerful Git aliases – Atlassian Blogs post has many great git aliases, and other Git tricks and references the below great video.
–jeroen
Posted by jpluimers on 2015/07/07
The One weird trick for powerful Git aliases – Atlassian Blogs post has many great git aliases, and other Git tricks and references the below great video.
–jeroen
Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management | Leave a Comment »
Posted by jpluimers on 2015/07/02
Hoping I never need it, but just in case:
Git: Remove sensitive data using git filter-branch and the BFG Repo-Cleaner.
Anyone who knows if there are equivalents for Mercurial/Hg?
–jeroen
via:
Posted in Development, DVCS - Distributed Version Control, git, Mercurial/Hg, Source Code Management | Leave a Comment »
Posted by jpluimers on 2015/06/23
I needed to get an existing Git repository to a client that had a tightened network. No SSH allowed, web proxy filtering out all sorts of sites and also performing a HTTPS man-in-the-middle to detect and reject all kinds of binaries, etc.
But we needed a public repository locally.
Which worked, thanks to pestrella, who answered about `bare` repositories to get my last steps correct:
In order to create a new Git repository from an existing repository one would typically create a new bare repository and push one or more branches from the existing to the new repository.
The trick is to know that server-side repositories are `bare` and client side repositories are `regular`. `bare` means the absence of a working copy on the server side.
I performed these steps:
Read the rest of this entry »
Posted in Development, DVCS - Distributed Version Control, git, Source Code Management | Leave a Comment »
Posted by jpluimers on 2015/06/16
Graeme Geldenhuys posted a great comment below.
Summary:
Git can do SVN, so locally you will see it as a Git repository, but the SVN repository will stay “as is” and not be affected neither will other SVN users be affected.
Two of the great benefits of this:
Combined, you can do these without the need to be online or wait for the SVN connection and transfer:
For instance to view your branches:
git branches -vvOr to show the branch-history:
git show-branch
It is how I access the FastMM repository from Git and described the git commands on how to get started and keep up to date.
Here is Graeme’s comment: Read the rest of this entry »
Posted in Development, DVCS - Distributed Version Control, git, Mercurial/Hg, Software Development, Source Code Management, Subversion/SVN | Leave a Comment »
Posted by jpluimers on 2015/06/11
I wish I had known this years ago. Thanks This is why I code!
This is why I Code Shared publicly: #Git A flowchart to help you with your git decisions http://justinhileman.info/article/git-pretty.
This is the blog post; the chard is below.
Git pretty
This chart is from the presentation Changing History, or How to Git Pretty. Check it out to learn how to use this IRL.
Here’s a printable PDF version, if you’re into that sort of thing.
If you like a more interactive way of decision making, this one is more elaborate: On undoing, fixing, or removing commits in git.
Note that on Windows, git does not like this:
git reset HEAD^
But does like this equivalent:
git reset HEAD~1
–jeroen
Posted in Development, DVCS - Distributed Version Control, git, Source Code Management | Leave a Comment »
Posted by jpluimers on 2015/06/10
After reading Converting Hg repositories to Git directed me into reading Bitbucket: Converting Hg repositories to Git I hoped moving my Mercurial repository on BitBucket to a Git repository would be something like following the steps.
It wasn’t.
First of all, hg-git on a Windows system requires Python or TortoiseHg. Neither of these I wanted to install for a one-off conversion.
So I took a throw-away Linux VM, and did the steps below. But let me first explain why.
My motivation for moving away from BitBucket to GitHub, especially for projects containing markdown documentation.
When writing documentation in Markdown, being able to in-line reference pictures or have relative-references to other documents. This works perfectly in local Markdown tools (like MarkdownPad 2 or LightPaper).
Posted in *nix, *nix-tools, BitBucket, Development, DVCS - Distributed Version Control, git, GitHub, Linux, Mercurial/Hg, openSuSE, Power User, Source Code Management, SuSE Linux | Leave a Comment »
Posted by jpluimers on 2015/06/09
Now that github stopped showing my README.rst as reStructuredText here is the htmlpreview link of the pandoc rendered reStructuredText:
It is about installing and configuring Tumbleweed which is a tad bit more frustrating than I hoped for.
In practice unixoids aren’t as heavenly as many geeks pretend them to be.
I got the htmlpreview solution via css – How to see an html page on github as a normal rendered html page to see preview in browser, without downloading? – Stack Overflow.
I might try the github pages in the future.
Sourcecode of htmlpreview is at htmlpreview/htmlpreview.github.com.
–jeroen
via:
Posted in *nix, Development, DVCS - Distributed Version Control, git, GitHub, Linux, openSuSE, Power User, Software Development, Source Code Management, SuSE Linux | Leave a Comment »
Posted by jpluimers on 2015/05/28
A while ago, I was fighting a corporate web proxy playing Man-in-the-Middle on all https sessions.
Though playing MitM on your employees is a debatable thing to do (especially without informing the employees, and illegal in certain countries, I had to get a GIT connection to the outside world working.
This helped tracking it down: GIT_CURL_VERBOSE “unable to get local issuer certificate”.
What I finally did was this:
"%ProgramFiles%\Git\bin\curl-ca-bundle.crt""%ProgramFiles(x86)%\Git\bin\curl-ca-bundle.crt""%ProgramFiles%\Mercurial\cacert.pem""%ProgramFiles(x86)%\Mercurial\cacert.pem"–jeroen
PS: These were the failures I was getting:
Posted in *nix, cURL, Development, DVCS - Distributed Version Control, git, PKI, Power User, Security, Source Code Management | Leave a Comment »
Posted by jpluimers on 2015/05/22
When during a git svn clone you get an error message starting with “RA layer request failed: PROPFIND request failed on” it means you have to set your git svn proxy.
This is in a different location than the git proxy setting (it would be too easy if these were the same, right?).
So you do not get/set it through commands like these:
git config --global --get http.proxy git config --global http.proxy localhost:3128
Via Cannot do git-svn fetch behind proxy and git svn clone died of signal 11 under cygwin (thanks janos, Fredrik Pihl and User Pavel, I found out that you need to change these files (create the .subversion directory and servers file when they do not exist):
If you ever run in the same problem with the regular SVN client, then you need to change yet different files (why have 1 standard when you can have many?):
Ensure a section like this exists and fill in the blanks:
[global] # http-proxy-exceptions = *.exception.com, www.internal-site.org http-proxy-host = YOURPROXY.com http-proxy-port = YOURPORT # http-proxy-username = defaultusername # http-proxy-password = defaultpassword # http-compression = no # http-auth-types = basic;digest;negotiate # No http-timeout, so just use the builtin default. # No neon-debug-mask, so neon debugging is disabled. # ssl-authority-files = /path/to/CAcert.pem;/path/to/CAcert2.pem<
Notes:
In some poorly managed networked environments, the %AppData% environment variable can be wrong, so make sure your Windows profile is not somewhere on a network share.
TortoiseGit seems to use yet another directory for GIT SVN server configuration.
–jeroen
via:
Posted in Cntlm, DVCS - Distributed Version Control, git, Power User, Source Code Management, SourceTree, Windows, Windows-Http-Proxy | Leave a Comment »
Posted by jpluimers on 2015/05/20
Adding relative links to screenshots in markdown files (like README.md) works way better at GitHub than on BitBucket:
For GitHub, this works, has documentation and various places with tips:
In fact it is a reason for some people to move public projects from Bitbucket to GitHub.
For private repositories that is different as GitHub charges for private repositories, but BitBucket has free private repositories.
Note: if you go the npm way, then you might want to have absolute URLs: Add images to readme.md in GitHub – Stack Overflow.
–jeroen
via: git – How to add screenshot to READMEs in github repository ? – Stack Overflow.
Posted in BitBucket, Development, DVCS - Distributed Version Control, git, GitHub, MarkDown, Mercurial/Hg, Power User, Source Code Management, SourceTree | Leave a Comment »