Images in GitHub’s wikis

GitHub is the best place (known to me) for doing a not-too-much-demanding management or collaboration of not-too-big projects. It offers you (of course!) repository hosting, powered by simple, yet effective bug and issues management and wiki pages for help or guides for your project. And the only problem, that beginners usually face, is hosting images for that wikis. GitHub allows you to upload images to issues in issue tracker and does all the dirty work of hosting them for you. But, a bummer appears, when it comes to images in wikis, because Add image button in any wiki page editor allows you to enter URL only and there is no way to simply upload them to your wiki.

Read More “Images in GitHub’s wikis”

Move repository from GitHub to Gogs or any other remote

This is basically a check-list on pushing entire local repository, with all branches, tags and entire history to brand new remote repository and changing default remote setting in local repostiory from one to another. A compilation of this and this answers on Stack Overflow plus some own thoughts. Gogs and GitHub are quite similar to each other and all operations an made on command-line, so you can use this article as an aid in migrating one remote repository to another.

Read More “Move repository from GitHub to Gogs or any other remote”

Installing Gogs on Windows [discontinued]

This article is unfinished and discontinued! It contains a lot of useful information, but will not lead you to the very end. The only reason, for which I wanted to install and use Gogs was the fact, that my programming model (Yii2-based) required me to have a really large number of private repositories (each for every component, that my applications are using). And storing them on GitHub was very expensive.

However, as of May 11, 2016 GitHub has announced an unlimited number of private repositories available for every paid plan. This rendered Gogs completely useless for me. But, in the same time, it was also a very relief for me, because even though a whole long year passed since I started writing this article, I have never actually even touched problem of reconfiguring Composer to use source other than GitHub (Gogs).

Feel free to use this article to learn more about Gogs and its installation on Windows, but keep in mind, that this artice is unfinished and pretty much likely will never be finished.

Read More “Installing Gogs on Windows [discontinued]”

Git diagram for data transport commands

If you’re unfamiliar with data transport commands in Git or have troubles understanding the idea of four “buckets” (workspace, index, local repository and remote repository) or you’re generally a newbie to Git, then there’s a great answer at Stack Overflow, which basically is a diagram image taken from Oliver Steele’s blog and that actually explains everything! :>

Read More “Git diagram for data transport commands”

Setting up new project in Gerrit

Because Gerrit is evil and wrong (see here for details), even such simple task,like creating a new project, requires a separate document and todo list. Also, keep in mind, that you can’t delete a project through web GUI of Gerrit. This is most wanted and requested feature of this dully project management tool, but still hasn’t been implemented for years. So, create your new project wisely, because you won’t be able to delete them, without playing around console, installing some third-party plugins or doing stupidities similar to this.

Read More “Setting up new project in Gerrit”

Completely remove file from local and remote (GitHub) repository

This is the short version of “Remove sensitive data” article in GitHub Help. And an alternative solution to the one presented [here](Remove file from repository and from all revisions.txt). It assumes, that you are the only collaborator to repository, so you can perform steps at once (you don’t have to contact others and wait until they rebase your changes) and that your repository doesn’t use tags, so you don’t have to perform all steps.

If any these two assumptions is not correct in your case, then avoid this article and rather follow to mentioned article. Keep in mind, however, that in some certain situations, you have to contact GitHub Support in order to finish entire procedure.

Read More “Completely remove file from local and remote (GitHub) repository”

Undo last Git commit using git undo-commit command

There are probably thousands of websites telling you, how to undo the last Git commit. For example, one of the most voted up questions on Stack Overflow. But none of them (or actually nearly none of them) answers, how to do this using git undo-commit. Simply because, such command does not exist! :> Therefore, the title of this text should rather sound “Defining own Git alias to undo last Git commit“, since this article is focused on git aliases rather than on undoing last commit in Git.

Read More “Undo last Git commit using git undo-commit command”

Differences between ‘ssh-keygen’ and ‘Puttygen’ SSH keys

There are some key differences between SSH keys generated by ssh-keygen and Puttygen, so you may run into problems importing or adding kesy generated by the latter one, while importing ssh-keygen‘s keys goes swimmingly. Here are some tips on this problem. Of course, we’re talking about public SSH keys, as private one are secret and shouldn’t be added or imported anywhere.

Read More “Differences between ‘ssh-keygen’ and ‘Puttygen’ SSH keys”

Remove file from repository and from all revisions [updated]

Say, that you have commited to a Git repository, a file, that contains sensitive or confidential information. You want to literally purge it from the repository history.

Simple git rm --cached <file> won’t do the trick. It will remove a file from the repository (keeping it in your working directory), but it will still keep the file in history. What now?

Read More “Remove file from repository and from all revisions [updated]”

BitBucket vs. Redmine — version control and repository management tools comparison

Here comes comparison in version control systems and project management tools. I’m going to compare cloud-hosted BitBucket with self-hosted Redmine. As some of you may already expect, the result can be only one.

For me, personally, BitBucket is an absolute, undoubted winner in this field.

Read More “BitBucket vs. Redmine — version control and repository management tools comparison”

An introductory comparison of BitBucket and GitHub

I decided to migrate from GitHub to BitBucket purely for economic reasons. On GitHub I can’t have any private repository in my free account. I have to pay for every non open source project, that I host there.

On BitBucket I can have unlimited number of private repos and I’m only paying for users, that has access to each of my repository (first five users are free).

This is the key advantage for me. And while BitBucket has many more of them, it also has some certain disadvantages. So, if you’re thinking about on-line repository management and want to choose between BitBucket and GitHub, this article can be a good start point for you.

Login and account

Both on-line VCSes has the same approach as for login and account creation. ​They only supports own / Google / Facebook / Twitter / GitHub login via OpenID. If you’re looking for a solution, that supports custom login methods, like for example to be able to let your forum users use also repository management and / or bug tracker and / or wiki, both GitHub and BitBucket are not an option for you.

However, if you give any of them a try, you may be surprised how many users have their own BitBucket account or can login via above accounts. Bitbucket itself is quite popular. And I don’t think there are many users of your forum, that don’t use any of above mentioned​​ services. So they actually don’t need to create an additional account. They just login with their favorite social network.

Next thing is, that we’re talking about devoted bug-reporters, that will be willing to reply your comments, provide screenshots, additional information etc. etc. If someone is devoted enough to your project, he or she will not object before creating another account / using another service to make your stuff even better. Actually, this is the only thing that matters.

Key differences

GitHub, which has much more users world-wide. The key difference between Bitbucket and GitHub, is how do they handle private repositories:

BitBucket allows an unlimited number of private repositories, but limits you to only up to five contributors to each repository. You are paying (starting at $10 / month) for sixth and more contributors — .

GitHub, on the other hand, let you have an unlimited number of contributors, but limits you to only public (open source) repositories. You’re paying (starting at $7 / month) for first and more private repositories — .

Both repository management systems allows you to use additional tools like bug tracker for issues management and wiki-like software for managing of documentation of your project. Both allows you to run public tracker / wiki, with non-public or even empty source code repository. So, you can have fully featured bug tracker (and wiki) open to public (to all with access to BitBucket / GitHub — i.e. above mentioned OpenID’ accounts) without need to make your source code public.

BitBucket’s issue tracker have an option to import and export issues in JSON format. So, while it can’t be used directly in any other bug tracking systems, it is quite adoptable, easy to read and import / export to any of them, after just a little bit more work. I have no idea about exporting things out of GitHub, as I never needed such functionality. I used BitBucket’s mechanisms to import all my GitHub repos.

There are two key advantages of using BitBucket over GitHub:

In BitBucket you and your users can use four different rich-text formats (Markdown, Creole, reStructuredText and Textile) to edit issues in bug tracker or pages in wikipedia, while on GitHub you’re limited to use Markdown only.

BitBucket offers source code repositories based on both Git and Mercurial, while GitHub supports only Git (as of writing this).

As mentioned, BitBuckets offers also a set of easy-to-use projects’ importers, for an easy migration from GitHub, Google Code etc. But all of them does not allow you to easily import BitBucket’s repos. So, if you’re sure that you want to use BitBucket, migration will be a very easy task for you. But keep in mind, that this is a one way road, so going back to GitHub, Google Code etc. might be a much harder job.

One, quite big disadvantage

Keep in mind, that GitHub is for their owners the only and most important “child”. A source of their fame and income. So, it does not surprise, that the put all their effort, each and every day, to make it better and better. On the other hand, BitBucket is Atlassian’s orphant child, set as a concurence to their big and expensive products — JIRA (extended bug and issuer reporting and tracking) and Confluence (information and documentation share center plus extended colaboration tools).

No one at Atlassian will ever admit this officially, but you can easily feel, that they treat BitBucket as an oprhant child — limiting number of features, it has, postponing bug fixing and implementation of features as long as it is possible etc., etc. By using BitBucket you agree to have accees to repository management, issue tracker and wikipedia with limited set of features and that you’ll wait even years for implementation of most obvious functions and things.

For example, thing as simple and obvious as labels (tags), that allows you to tag each isssue with certain number of labels, is now “only” fifteen months old and even so, it still has new status. And there are certain reason, why I do fear, that it will never be implmented. Mostly, because of JIRA and some strange design-focus, BitBucket’s dev team has. They kick-back every argument in this discussion, with an answer, that you already have “components”, which work pretty much like labels or tags. The only pity exception is, that you can have only one component per issue, which make them completely useless, at least in the meaning like labels and tags are.

But, let be honest. Even if people are yealling, that they left or are about to leave BitBucket for GitHub or something else, because of lack of such basic functionallity, like labels, BitBucket’s dev and management teams doesn’t actually care much for that. They have their money out of JIRA and Confluence and don’t treat BitBucket to seriously.

Don’t forget about wiki

If you decide to give BitBucket a try, you should also consider migrating your documentation to BitBucket’s wikipedia. It is quite good option:

  1. A person with one account (any of above mentioned) can report bugs or issues and edit documentation,
  2. It is free, on-line, hosted in the cloud, so no software installation / update, no server-work on your side, even no server needed. Much less work for you to setup and handle.
  3. Though it is a wiki / documentation, it is still a Git repository, so you can download entire wikipedia in common format (a bunch of text files in Markdown, Creole, reStructuredText or Textile format) for an easy backup purposes or massive edit / change of files, much faster than online access.

Since BitBucket supports Creole formatting language (quite very similar to original MediaWiki format), it should be a snap of fingers to migrate all your docs with all your formatting, links etc., if you get used to something like MediaWiki.

Please rebase the change locally and upload again for review

You’ve passed all the way of flames, blood and pain, through Gerrit, you done reviewing a change and you’re ready to click Review and Publish button. You hit it and Gerrit hits you with: Project policy requires all submissions to be a fast-forward. Please rebase the change locally and upload again for review. How, the hell this happend and how to handle this?

Read More “Please rebase the change locally and upload again for review”

Gerrit is wrong. Gerrit is evil!

Gerrit is wrong. Gerrit is evil. Gerrit is the beginning of all hell! If you’re considering using it as version control system, you’re most likely out of your mind! And you’re asking yourself for a big troubles. If you’re forced to use it (like I was), then believe me… your worst nightmares are ahead of you. Nothing, you seen in code review or version control systems up until now, hasn’t prepared you for the pain you’re about to suffer…

Read More “Gerrit is wrong. Gerrit is evil!”

Change could not be merged because of a missing dependency

Gerrit is hard. If you found Git (behind Gerrit) hard to understand and operate, then don’t worry — the real hell is still before you. And one of the biggest Gerrit newbies’ nightmares is situation, when Gerrit is unable to auto-merge particular change, showing “Change could not be merged because of a missing dependency” message. This mostly happens, when you abadon another change, on which current change depends.

Read More “Change could not be merged because of a missing dependency”

Push local repo to a new remote with all branches tags and all the history

Since both me and my boss / admin are kind of newbies to Git and since our both vision on how application structure should look is a way different, we quickly did a quite pretty mess in our main repository and got lost a little bit! :] After some short talk, we agreed on one thing (at least). We need to make a new, clean Git repository and push everything from my local repository to it.

This brought us to a question, how to do this? After a short googling, I found these Stack Overflow questions:

but none of them gave me a quick-and-dirty answer (or: checklist) on how to do this, without too much read.

So, I decided to write my own. Once again, Git turned out to be much better and much easier than SVN.

Read More “Push local repo to a new remote with all branches tags and all the history”

TortoiseGit asking for password on password-less login setup

After months of uninterrupted password-less work, my TortoiseGit started to ask me for a password on some of my remotes, when pushing / pulling. I’m seeking a solution to fix this, as this can drive me crazy. I haven’t found a good fix so far, so don’t treat this article as an ultimate solution. Nevertheless, you can get a quick check-list out of this text to see, what I’ve managed to find out so far.

Read More “TortoiseGit asking for password on password-less login setup”

Git did not exit cleanly (exit code 128)

Probably the most popular error in TortoiseGit is:

git did not exit cleanly (exit code 128)

And all, it tells you, is that something was wrong when calling git.exe internally. That’s pretty not much, don’t you think? Well, this StackOverflow question may help you, at least in certain situations. It has 14 answers (from dumbest, like not updating program to newest version) to quite interesting one. This could be a good starting point, before looking somewhere else.

Setting up password-less connection in Git Bash or cmd

All right, we’re after Setting up password-less connection in Netbeans and Setting up password-less connection in TortoiseGit, now it is time to do the same in “pure Windows”, that is: to be able to establish password-less connection with any Git-based repository in command-line (both cmd and Git Bash).

If you were using your repo in Netbeans and/or TortoiseGit painlessly, but each attempt of doing the same in console, ends up with annoying message:

Disconnected. No supported authentication methods available (server sent: publickey)

then you’re in right place to get help.

Read More “Setting up password-less connection in Git Bash or cmd”

Setting up password-less connection in Netbeans

Following Setting up password-less connection with GitHub in TortoiseGit article, here are tips on how to setup password-less connection between your GitHub account and your local repository operated under Netbeans. The easiest way to setup password-less connection, is to do this on initial GitHub repo clone or pulling. And it will be presented this way, in following article.

Read More “Setting up password-less connection in Netbeans”