Dev1 creates a (short-lived) feature branch from trunk
git checkout master
git checkout -b feat-1
Dev1 do his work and commits there...
git diff >> some-changes.patch | |
...send file to someone... | |
git apply /path/to/some-changes.patch |
#!/bin/bash | |
# Copyright © 2017 Google Inc. | |
# 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 | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
Dev1 creates a (short-lived) feature branch from trunk
git checkout master
git checkout -b feat-1
Dev1 do his work and commits there...
PROJECT_NAME="$(basename -s .git `git config --get remote.origin.url` | tr "[:upper:]" "[:lower:]")" | REV="$(git rev-parse --short HEAD)" | BRANCH="$(git branch | grep \* | cut -d ' ' -f2 )" | sed -i "" "s/{{namespace}}/${PROJECT_NAME}-${BRANCH}-sha.${REV}/g" file.yaml |
lookup: https://web.archive.org/web/*/example.com | |
save: https://web.archive.org/save/http://example.com |
#!/bin/sh | |
# This pre-commit hook will prevent you from committing any line (or filename) containing | |
# the string NOCOMMIT. Use that tag in comments around source code you want to avoid | |
# accidentally committing, like temporary IP addresses or debug printfs. | |
# | |
# To add it to an existing repository, save it to .git/hooks/pre-commit (or append, if | |
# that file already exists). Remember to make executable (chmod +x ...) | |
# | |
# To automatically add this pre-commit hook to every repository you create or clone: |
<details> <summary>How do I dropdown?</summary> <br> This is how you dropdown.
curl -kso /dev/null -H "Pragma: no-cache" -H "Cache-Control: no-cache" -w "DNS: %{time_namelookup}, \ | |
SSL: %{time_appconnect}, \ | |
TCP: %{time_connect}, \ | |
TTFB: %{time_starttransfer}, \ | |
TOTAL: %{time_total}\n" https://www.parcelhero.com |
git ls-files | xargs cat | wc -l | |
to see breakdown use | |
git ls-files | xargs wc -l |