Skip to content

Instantly share code, notes, and snippets.

View vladak's full-sized avatar

Vladimir Kotal vladak

  • Europe
View GitHub Profile
@vladak
vladak / gist:a69956dd6afc982deb66c3594cce86d4
Last active October 31, 2017 20:41
Tagging unix-prog-in-c
Use numbered tags, starting with v0
Optionally, append a description, e.g. v10-translated-foo
Create and push a tag like so:
git tag vXYZ
git push origin tagXYZ
It is recommended to push concrete tag to avoid pushing lightweight/local tags.
@vladak
vladak / gist:87de4f58c89f8ba61027c646e50c6f86
Created September 20, 2017 19:11
git and shell prompt
https://github.com/jimeh/git-aware-prompt
https://www.youtube.com/watch?v=g8BRcB9NLp4
https://github.com/banga/powerline-shell#bash
https://www.quora.com/What-is-the-best-Bash-prompt-for-Git
https://github.com/Bash-it/bash-it
https://github.com/Lokaltog/vim-powerline
https://github.com/lucascosti/bashrc
git command/branch completion
https://github.com/magicmonty/bash-git-prompt
@vladak
vladak / curl.md
Created February 20, 2017 18:21 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@vladak
vladak / sync.md
Created February 20, 2017 15:21
sync with upstream

from @DaveRandom:

  • Add another remote to your local clone: git remote add upstream https://github.com/OpenGrok/OpenGrok (this will also work with [email protected]:OpenGrok/OpenGrok.git if you prefer to work over SSH)
  • Fetch information about the new remote you just added to allow you to work with it locally: git fetch upstream
  • Sync your local changes with the upstream remote: git pull --rebase upstream master. After doing this you may need to resolve conflicts, git will instruct you on what it expects you to do. By the looks of if you shouldn't currently have any issues with this.
  • "Squash" your commits into a single commit: git rebase -i HEAD~14. This will start an interactive rebase, it will launch a text editor to enable you to complete it, more info here.
  • Once you have done this you will need to perform a forced push (git push -f) to the master branch of your origin remote to update this pull request.

I HIGHLY RECOMMEND that you practice this by creating a new local branch based on your c