-
Strikethrough:
Strike me!
-
-
Save oskopek/2785c14d1b083f978e5d to your computer and use it in GitHub Desktop.
-
Show merged local branches (into the current branch):
git branch --merged
-
Inverse:
git branch --no-merged
-
-
Interactive rebase (really useful, follow instructions after running):
git rebase -i (onto_branch)
-
Pushing after a rebase:
git push (remote) (to_branch) --force
-
-
Show remote repositories:
git remote -v
-
Show branches in a remote repo:
gity remote show (remote)
-
Enforce fast-forward merge:
git merge --ff-only
-
Inverse (enforce non-fast-forward):
git merge --no-ff
-
[color]
diff = auto
ui = true
[user]
email = [email protected]
name = Ondrej Skopek
[merge]
tool = meld
[push]
default = simple
[core]
autocrlf = input
[alias]
tree = log --graph --abbrev-commit --decorate --date=relative --all
treeo = log --graph --oneline --decorate --date=relative --all
s = status -s
st = status
d = diff
a = add
cm = commit
re = rebase
m = merge
co = checkout
f = fetch
b = branch
l = log
Goal: update master → prepare local repo for rebase against master
#!/bin/bash
cur_branch=`git status | head -n 1 | grep -Eo '[^ ]+$'`
git checkout master
git fetch origin
git fetch upstream
git merge origin/master --ff
git merge upstream/master --ff
git push origin master
git checkout "$cur_branch"
#git rebase -i master
-
Open class of name:
CTRL+N
-
Open file of name:
CTRL+SHIFT+N
-
-
Zoom font:
CTRL+MouseWheel
-
Needs to be enabled:
Settings > Editor > General > Change font size (Zoom) with Ctrl + Mouse Wheel
-
Recommended:
Settings > Appearance & Behavior > Keymap > Editor Actions > Reset Font Size: Add keyboard shortcut: CTRL+0
-