Or, which branch has my commit?
# Any branch have this commit?
git branch --contains $COMMIT_ID
# Filter for branches (only this branch) if it has this commit
#!/bin/sh | |
# From Gerrit Code Review 3.4.0 | |
# | |
# Part of Gerrit Code Review (https://www.gerritcodereview.com/) | |
# | |
# Copyright (C) 2009 The Android Open Source Project | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at |
import { Alert, Input, Row } from 'antd'; | |
import { debounce } from 'lodash'; | |
import React, { useCallback, useState } from 'react'; | |
import { createPaginationContainer, graphql } from 'react-relay'; | |
import PersonCard from 'components/cards/PersonCard'; | |
import FlexGrid from 'components/FlexGrid'; | |
import InfiniteScroller from 'components/InfiniteScroller'; | |
import InnerWrapper from 'components/InnerWrapper'; | |
import WaveStroke from 'components/svgs/WaveStroke'; |
#!/bin/sh | |
# tail -F $HISTFILE | ./historymaker.sh | |
awk ' | |
BEGIN { print "Beginning" } | |
# $0 ~ / ([0-9]+):[0-9]+;(.+)/ { print $0} | |
match($0, / ([0-9]+):[0-9]+/) {print "\033[37m"strftime("%m/%d/%Y @%H:%M:%S", substr($0, RSTART+1, RLENGTH-1))} | |
match($0, /;(.+)/) {print "\033[32m" "" substr($0, RSTART+1, RLENGTH-1)} | |
END { print "done"} |
rmb () { | |
current_branch=$(git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/') | |
if [ "$current_branch" != "master" ] | |
then | |
echo "WARNING: You are on branch $current_branch, NOT master." | |
fi | |
echo "Fetching merged branches..." | |
git remote prune origin | |
remote_branches=$(git branch -r --merged | grep -v '/master$' | grep -v "/$current_branch$") | |
local_branches=$(git branch --merged | grep -v 'master$' | grep -v "$current_branch$") |
# edit your ~/.gitconfig file... | |
[diff] | |
tool = smerge | |
[merge] | |
tool = smerge | |
[difftool] | |
prompt = false | |
[mergetool] |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
[color] | |
branch = auto | |
diff = auto | |
status = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green | |
[color "diff"] | |
meta = yellow bold |
#!/bin/bash | |
# For each ref being updated | |
# If it is master (branch) | |
# Then... update our server? | |
while read oldrev newrev ref | |
do | |
if [[ $ref =~ .*/master$ ]]; | |
then |
I hereby claim:
To claim this, I am signing this object: