Here are the steps that I too to merge multiple GitHub repos into one, while preserving all commit history. The process took about 30 minutes for 5 repos. As a result, I feel like my GitHub page is cleaner and code is actually better organized and easier to find. TLDR: Create new repo (or use […]
Private Git Repository on Any Computer
With popularity of Github and many other competing offerings, it’s easy to overlook how simple it is to set up (unlimited) private repos on any network connected computer. For example, I run this blog on a cheap instance of Linode, where $5 a month get’s you 20Gb SSD storage. But you don’t have to pay […]
How to use git log command line parameters
Git comes with a very power history viewing command – git log, which supports a number of command line parameters. This options are very powerful, especially when used in combination. Here are the ones that I use the most: –author=“Alex Kras” – Only show commits made by a certain author –name-only – Only show names […]
Git grep multiple repos at once
Updated in 2020 to work with Python 3. My company uses multiple git repos that all depend on one another. Often I find myself trying to grep through a few of them at the same time. Regular grep works, but it takes a long time and displays a lot of noise. git grep only searches […]
Generate Weekly Reports from Your Git Commits
My current work requires me to submit weekly reports and so did some other jobs that I’ve had in the past. To help with that task, I wrote the following script that: Goes through every one of my git repos Checks if I’ve made any commits in the past week If I did, prints the […]
How to Add Git Auto-Completion for the Command Line Tools in Mac OS X
Git supports auto-completion when used via the terminal, which includes all basic commands such as git status or git checkout as well as local and remote branch names etc. It comes pre-installed on Ubuntu, but a few simple steps (bellow) have to be followed to get it working on Mac. Open up your terminal app […]
Git Mind Map
I’ve been cleaning out my old computer and came across a git mind map that I’ve used to put together this Git Cheatsheet. Both are aimed towards beginners. If you are an intermediate Git user, you might find 19 Tips For Everyday Git Use to be more interesting. I’ve thought that some people might prefer […]
19 Git Tips For Everyday Use
Table of Contents: Parameters for better logginggit log –oneline –graph Log actual changes in a filegit log -p filename Only Log changes for some specific lines in filegit log -L 1,1:some-file.txt Log changes not yet merged to the parent branchgit log –no-merges master.. Extract a file from another branchgit show some-branch:some-file.js Some notes on rebasinggit […]
Git Cheat Sheet
View it on GitHub
Delete Fork Dependency of a Repository on Atlassian Stash or GitHub
A colleague of mine forked a repo on Stash, just to re-use configuration. A better way of doing things would be to clone the original repo, keep the necessary config/setup files, delete .git folder, and re-initialize the new repo from scratch. In our case, we only noticed the fork about a week into the project, […]