Skip to content

Instantly share code, notes, and snippets.

@nzakas
nzakas / gist:5511916
Created May 3, 2013 17:47
Using GitHub inside a company

I'm doing some research on how companies use GitHub Enterprise (or public GitHub) internally. If you can help out by answering a few questions, I'd greatly appreciate it.

  1. What is the primary setup? Is there an organization and each official repo is owned by that organization?
  2. Does every engineer have a fork of each repo they're working on?
  3. Are engineers allowed to push directly to the official repo? Or must all commits go through a pull request?
  4. Do engineers work on feature branches on the main repo or on their own forks?
  5. Do you require engineers to squash commits and rebase before merging?
  6. Overall, what is the workflow for getting a new commit into the main repository?
  7. What sort of hooks do you make use of?
  8. Are there any ops issues you encountered? (Scaling, unforeseen downtime, etc.)
@mathiasverraes
mathiasverraes / with_stashes.sh
Last active June 23, 2018 14:12
Show git branch name on command prompt. Put this in your ~/.bash_profile or whatever your OS uses, then restart your terminal and cd to a git folder. It should look something like: yourname@machine /path/to/project [my-branchname] $ UPDATE: the `with_stashes.sh` version also shows the number of entries in your git stash on the command prompt. Sc…
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/'
}
# git branch on command prompt
if [[ ${EUID} == 0 ]] ; then
PS1='\[\033[01;31m\]\u@\h \[\033[01;34m\]\w\[\033[01;35m\]$(parse_git_branch)\[\033[01;34m\] \$ \[\033[00m\]'
else
PS1='\[\033[01;31m\]\u@\h \[\033[01;00m\]\w\[\033[00;33m\]$(parse_git_branch)\[\033[00m\] \$ '
fi