Category: Github

  • Finding Deleted File with GitHub

    Let me show you how to find a deleted file with GitHub by using the git log all command.
    (more…)

  • GitHub error: cannot lock existing info/refs fatal

    Are you trying to git pull or git push and receiving the nasty Github cannot lock existing info/refs fatal? There is a nice and quick easy fix. Run the following command:
    git remote prune origin

    (more…)

  • Git pull rebase recovery

    Using git pull –rebase is a great way to avoid those awkward looking commits of Merge branch ‘development’ of in the list of commits. Very difficult to read the actual deltas. Performing a Git rebase helps solve this. However, from time-to-time I’ve received conflicts and could not figure out how to fix the rebase and carry on. Scariest moments of my life. Luckily I’ve been able to recover from this.

    (more…)

  • Merge one or more Git commits into a different branch

    Problem

    You have a commit that you want to move from one branch to the other. This is commonly required when there are additional commits in the branch where your commit is, so you are unable to merge the entire branch.

    Solution

    (more…)

  • Git – Squashing multiple commits into one when merging a branch

    When you are using Github, it’s quite common to branch your work while working on a feature. Many times your branch contains a lot of small commits that when you merge it into your main branch you want a single commit message describing the full work in that branch.

    Git offers a handy command called git merge –squash [your-branch]. This is then a followed by a regular git commit and git push.

    (more…)