Git - sgml/signature GitHub Wiki

Vulnerabilities Database

Github

Gov

MCP

Docs as Code

https://github.com/git/git.github.io

Cheatsheet

https://gist.github.com/jedmao/5053440

CircleCI

Shortcut

Events

https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows https://docs.docker.com/build/ci/github-actions/

Security

https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions

Terminology

https://git-scm.com/docs/gitglossary

Local Repository Guide

To see all branches, use fetch with the all and verbose options:

git fetch --all --verbose

To see all branches by name, use branch with the -r option, pipe to grep, and use sed to strip the word origin:

git branch -r | grep 'foo' | sed 's/origin\///'

Cloning and Remote Upstreaming

To clone a specific branch, use `--single-branch --branch :

git clone --single-branch --branch foo [email protected]:foo-bar/baz.git

To sync a new repo, make a new folder and go to it:

mkdir foobarbaz
cd foobarbaz

Create the directories, initialize the local git repo, and copy the code locally, create a branch:

mkdir framework
cd framework
git init
git clone ssh:foobarbaz.git
git remote remove origin
git remote add origin [email protected]:myname/foobar.git
git branch --set-upstream-to=origin/master master
git push --set-upstream origin master

To view remotes:

git remote -v show

To create a new branch, use git checkout -b:

git checkout -b myBranch

To link a new branch to a remote repo, use git branch --set-upstream-to:

git branch --set-upstream-to=origin/project/sprint-25-3-8to3-21 feature/INVPROD-2419 

To list all remote branches, use git branch -r:

git branch -r

git branch -r | grep localhost

To switch branches, use git checkout with no options:

git checkout foo

To reset existing commits and create a new branch, stash your local env, create a branch from it, push the changes, switch to the current top-level branch, then pull in the latest changes:

git push
git stash 
git stash branch local-changes
git add *
git push
git checkout master
git pull
git checkout -b newbranch
git checkout -p origin/local-changes 

Checkin

To check in, use the following process:

Add new files:

git add foo

Stash changed files:

git stash

Stash specific files:

git stash push [--] [<pathspec>...]

Pull new changes from the repo:

git pull

Show stashed file list:

git stash show

List stashed changes:

git stash list

Merge stashed changes:

git stash apply

Commit pushed changes:

git commit -m "foo bar baz"

Amend an unacceptable commit message:

git commit --amend

Undo an amended or other staged commit:

git reset 'HEAD@{1}' --soft

Revert the last pushed commit

git revert HEAD 

Push new changes to the repo:

git push

Diff current remote to an older branch:

git diff FETCH_HEAD...feature/MAS-2782 --diff-filter=A

Diff last two revisions:

git diff 7194f404d5dccbb177bf4ea5aefa4d60081def31..452db42589004b3b2838933d6fcb6e046f980f28

One file copy from one commit to the local branch:

git show [commit hash] -- /foo/bar/baz.js > /foo/bar/baz.js

Remove a file

git rm -f ngtemplates.js

Reset the local branch HEAD to the remote branch HEAD

git reset
git checkout -b feature/INVPROD-4781
git branch --set-upstream-to=origin/feature/INVPROD-4781 feature/INVPROD-4781
git reset --hard FETCH_HEAD

Cherry pick

  1. Checkout master

  2. Create a branch from it called misc/foo

  3. Cherry pick from develop For example:

    git push # sync the branch you're working on to its remote git pull # pull in the merged changes git fetch git checkout master # change branches to the one you want to modify git cherry-pick 533c2093200 #merge; Run git status, resolve conflicts, Run git add, then commit and push

If you pull all cherry pick files this way, you can create a yaml file and parse them using tac, awk, and xargs:

tac commits.yaml | awk '// {print $2}' | xargs git cherry-pick

Blame

  1. Open a file

  2. Find the line

  3. Run git blame on it. For example:

    git blame -L 374,376 schema.py

Web Search

Search by Path

Find all Vue.js files in the pages path with the word 'organization':

repo:example.org/web.foo organization language:Vue path:pages

Log Search

Search by Date and Author

git log --since 2017-08-06 --remotes='*' --author=Foo* | grep commit

Search and format non-merge commits

git log --pretty=format:"%h%x09%an%x09%ad%x09%s" --no-merges --since 2024-03-01 --author Foo | awk '!/Merge/'

Interactive Patch of Selected Files or Commits

git pull origin develop

git checkout -b myDevIntgrMerge #new branch

git checkout -p origin/foo -- ./test #pick branch and subdirectories

Manual Conflict Resolution

If you are several weeks or months behind on a branch, use the following process:

  • For each conflict in each file, copy the HEAD changes and paste them to the end of the file
  • For each conflict at the end of the file, compare the fragments to the source file in the branch
  • Piece together the conflict hunks at the bottom of the file, then resolve the conflicts one by one
  • Run a linter to make sure there are no syntax errors
  • Merge the newly resolved files

Auto Conflict Resolution

When you get into a failed merge state, the index/stage splits into three. The first index is the abyss. The second index is your version of things. The third is the remote version of things. From here, you can either git checkout file --ours or git checkout file --theirs. This will accept either your file or their file into the stage, overriding the merge conflict in that file. git commit and that pesky merge conflict is dead.

git checkout origin/dev-intgr --ours -- foo.bar

git checkout origin/feature/baseline --ours -- ApplicationMockData.js

Auto reset and merge to rollback to an unmerged commit

git pull origin baseline

git reset HEAD 12345

git checkout -b rebaseline

git merge -s ours origin/feature/baseline

Rollback a repo to a merged commit

git checkout master
git checkout -b rollback
git checkout -p rev_to_rollback_to

Rollback a file to a merged commit

git checkout master
git checkout -b rollback
git checkout -p rev_to_rollback_to ./index.html

Select the files and changes you want during each prompt

Apply this hunk to index and worktree [y,n,q,a,d,/,e,?]?

Using the following key:

y - apply this hunk to index and worktree n - do not apply this hunk to index and worktree q - quit; do not apply this hunk or any of the remaining ones a - apply this hunk and all later hunks in the file d - do not apply this hunk or any of the later hunks in the file g - select a hunk to go to / - search for a hunk matching the given regex j - leave this hunk undecided, see next undecided hunk J - leave this hunk undecided, see next hunk k - leave this hunk undecided, see previous undecided hunk K - leave this hunk undecided, see previous hunk s - split the current hunk into smaller hunks e - manually edit the current hunk ? - print help

Then push to the remote using:

git push --set-upstream origin myDevIntgrMerge #push merge

Merge to stable from unstable without accepting any commits

git merge origin/feature/INVPROD-2898-release -s ours

Merge to unstable from stable without auto resolving conflicts

git merge origin/integration -s recursive -X ours

Test for Bitbucket Conflicts Locally

You need to update your local master branch. So do the following steps :

git checkout master
git pull origin master

Resolve the conflicts here, then run:

git add *
git stash
git checkout << your branch >>

To pull in your local changes, run git stash apply

git merge master

Resolve the conflicts again

git add *
git commit
git push

Ours Merge Strategies

For starters, git merge -s ours xyz is not the same as git merge -X ours xyz. The first uses merge strategy called “ours”, and the second uses default ‘recursive’ merge strategy, but with “ours” option. Creating two entities named “ours” that do similar, but subtly different things is the epitome of bad interface design.

The “-s” variant creates a commit that merges current branch and “xyz”, but ignores all changes from xyz, so the resulting content would be identical to the current branch. This is useful for getting rid of unwanted branches when force-pushes and deletes are disabled. The “-X” variant only ignores changes from xyz that cause a conflict. Changes from xyz that do not cause a conflict will be included in the end result.

Merging Two Repositories

Revert Local Git Changes

To fix an invalid commit message(no iTrack, no whitespace, etc), do the following:

git commit --amend

To clean mistaken deletes or checkins, do the following:

git reset --hard HEAD

Then clean the untracked files and directories with:

git clean -df

Search the commit history of a branch

git reflog master@{one.week.ago}

Git easy-to-parse status

git status --porcelain=2

Rename a Branch

  1. Rename your local branch

    git branch -m new-name

Remove a Branch

  1. git branch -d example

  2. Delete the old-name remote branch and push the new-name local branch.

    git push origin :old-name new-name

  3. Reset the upstream branch for the new-name local branch.

    git push origin -u new-name

Store Password

Create a netrc file:

Linux: vi ~/.netrc Windows: New-Item -Name _netrc -ItemType File -Path $env:userprofile Set the permissions for your eyes only:

chmod 0600 ~/.netrc Then add the bitbucket URL and your username and password:

machine bitbucket.etrade.com login myusername password mypassword

Patch Mode

https://www.codementor.io/@maksimivanov/add-specific-lines-with-git-patch-eais7k69j

https://thoughtbot.com/blog/intent-to-add

https://dev.to/krnsk0/a-thorough-introduction-to-git-s-interactive-patch-mode-4bl6

https://git-scm.com/docs/git-apply

Naming Conventions

  • bugfix/: bug fixes
  • hotfix/: hot fixes for production
  • release/: code for new feature releases
  • chore/: documentation, copy, and image
  • experiment/: demos
  • wip/: drafts
  • improvement/: refactoring

Search for Comments

import subprocess
import sys

def fetch_comments_by_user(user):
    try:
        # Run the git log command to get commit messages by the specific user
        result = subprocess.run(
            ["git", "log", "--author={}".format(user), "--pretty=format:%H - %s"],
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE,
            text=True
        )

        if result.returncode != 0:
            print("Error:", result.stderr)
            return

        # Print the commit messages
        commits = result.stdout.split("\n")
        for commit in commits:
            print(commit)
    except Exception as e:
        print("An error occurred:", e)

if __name__ == "__main__":
    if len(sys.argv) != 2:
        print("Usage: python fetch_comments.py <user>")
    else:
        user = sys.argv[1]
        fetch_comments_by_user(user)

History

https://www.theregister.co.uk/2005/04/14/torvalds_attacks_tridgell/

https://www.aosabook.org/en/git.html

https://spderosso.github.io/onward13.pdf

https://news.slashdot.org/story/16/05/10/1840255/11-years-after-git-bitkeeper-is-open-sourced

Migration

http://wiki.c2.com/?MercurialVersionControl

https://www.rath.org/why-you-should-give-mercurial-a-shot.html

https://www.tshooter.com.br/en/2016/03/07/eight-reasons-to-prefer-git-to-invs-tfvc/

https://lwn.net/Articles/574079/

https://tech.blog.aknin.name/2010/05/14/switching-to-mercurial-taming-zsh/

https://wilsonmar.github.io/tfs-vs-github/

https://blogs.microsoft.co.il/leonj/2017/06/05/avoid-excessive-database-growth-for-git-tfs-users/

https://thenewstack.io/microsoft-forged-scalable-git/

http://help.manuscript.com/7984/mercurial-branches-versus-kiln-branches

Architecture

https://graphite.dev/guides/git-branch-naming-conventions

https://docs.microsoft.com/en-us/archive/msdn-magazine/2017/august/devops-git-internals-architecture-and-index-files

https://wiki.gentoo.org/wiki/Git

http://www.linuxfromscratch.org/blfs/view/svn/general/git.html

https://www.freshports.org/devel/git/

Large Files

https://support.acquia.com/hc/en-us/articles/360004334093-Removing-large-files-from-Git-without-losing-history

Search Engine

https://github.com/git/git/blob/master/Documentation/git-grep.txt

https://www.endpoint.com/blog/2010/04/26/make-git-grep-recurse-into-submodules

URL Paths

https://github.com/foo/bar/compare/master...develop

Github Actions

Variables

PythonPath

https://www.ianwootten.co.uk/2020/10/23/publishing-to-pypi-using-github-actions/

OIDC

Cookies

Github Actions Environment Variables

Workflow and Run Information

  • GITHUB_WORKFLOW
  • GITHUB_RUN_ID
  • GITHUB_RUN_NUMBER
  • GITHUB_ACTION
  • GITHUB_ACTIONS

Repository Information

  • GITHUB_REPOSITORY
  • GITHUB_REPOSITORY_OWNER
  • GITHUB_REF
  • GITHUB_REF_NAME
  • GITHUB_REF_TYPE
  • GITHUB_SHA

Runner Information

  • GITHUB_WORKSPACE
  • RUNNER_OS
  • RUNNER_ARCH
  • RUNNER_TEMP
  • RUNNER_TOOL_CACHE

Event Information

  • GITHUB_EVENT_NAME
  • GITHUB_EVENT_PATH

Secret Information

  • Secrets added in the repository settings, e.g., MY_SECRET

Run once a day

name: Run Script Daily

on:
  schedule:
    - cron: '0 0 * * *' # This cron expression schedules the job to run once a day at midnight UTC
  workflow_dispatch: # Allows you to manually trigger the workflow

jobs:
  run-script:
    runs-on: ubuntu-latest

    steps:
    - name: Checkout repository
      uses: actions/checkout@v2

    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: '3.x'

    - name: Install dependencies
      run: |
        if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

    - name: Run specified file
      run: python ${{ secrets.SCRIPT_FILE }}
      env:
        SCRIPT_FILE: ${{ secrets.SCRIPT_FILE }}

Use Cases

https://briangrinstead.com/blog/publishing-vite-project-to-github-pages/

Comparison to cron and Apache Airflow

This table shows which Airflow features can be replaced with simpler tools like GitHub Actions or EC2 cron jobs. It uses plain language and includes notes on CPU and memory usage.

Airflow Feature GitHub Actions Version EC2 Cron Job Version What It Means CPU Requirements Memory Requirements
Scheduled Tasks on: schedule with cron crontab entries Run tasks at specific times Very low – just a trigger Very low
One-Step Jobs Single job step Shell or Python script Do one thing, like delete files or call API Low to medium – depends on task Low to medium – depends on task
Set Up Environment runs-on: + setup actions EC2 bootstrap or AMI Prepare the machine before running jobs Medium – container or VM startup Medium – container or VM setup
Basic Logging GitHub logs Redirect output to log files Save what happened during the job Very low Low
Alerts (Success/Fail) Slack/email on failure mail or webhook on exit Notify someone if job worked or failed Very low Very low
Retry if Fails continue-on-error + retries Retry loop in script Try again if something goes wrong Low to medium – retry adds load Low to medium
Use Variables Inputs or env vars Script args or env vars Change settings without editing the script Negligible Negligible
Keep Secrets Safe GitHub Secrets AWS Secrets Manager or .env Hide passwords or keys Very low Low

Some Airflow features are harder to replicate with simple tools:

  • Task dependencies and branching
  • Waiting for events (like a file arriving)
  • Monitoring lots of jobs at once
  • Visual dashboards and retry control

References

https://git-scm.com/docs/git-stash

https://www.linux.org/docs/man7/gitrevisions.html

https://help.github.com/en/github/searching-for-information-on-github/searching-issues-and-pull-requests

http://people.irisa.fr/Anthony.Baire/git/git-advanced-handout.pdf

https://github.com/git/git/blob/master/Documentation/git-checkout.txt

https://www.kernel.org/pub/software/scm/git/docs/git-checkout.html

https://stackoverflow.com/questions/30778200/git-cli-commands-for-stage-unstage-hunks-lines-like-sourcetree

https://stackoverflow.com/questions/22297284/create-a-git-diff-of-a-file-from-sourcetree

https://devtut.github.io/git/cherry-picking.html#copying-a-commit-from-one-branch-to-another

https://www.python.org/dev/peps/pep-0103/

https://docs.moodle.org/dev/Git_for_developers

http://www.noah.org/wiki/Git_notes

https://www.wikihow.com/Use-Git-Effectively

https://www.sbf5.com/~cduan/technical/git/git-3.shtml

https://kofoedanders.com/git-cooperation-simplified/

http://joemaller.com/990/a-web-focused-git-workflow/

https://news.ycombinator.com/item?id=12785200

http://travisjeffery.com/b/2012/02/search-a-git-repo-like-a-ninja/

https://help.github.com/articles/changing-a-commit-message/

http://git-extensions-documentation.readthedocs.io/en/latest/modify_history.html

https://davidwalsh.name/git-default-remote

Git User Manual

https://www.cloudbees.com/blog/advanced-git-jenkins

https://community.atlassian.com/t5/Bitbucket-questions/behind-ahead-incorrect/qaq-p/4749

https://confluence.atlassian.com/bitbucketserver050/automatic-branch-merging-913474751.html

https://confluence.atlassian.com/bitbucketserverkb/how-to-define-a-default-merge-strategy-per-project-894207103.html

https://git-scm.com/book/en/v2/Git-Internals-Transfer-Protocols

https://blog.petrzemek.net/2016/07/10/git-patch-mode-all-the-way/

http://mindspill.net/computing/linux-notes/git-diff-tree-whitespace/

https://blog.bigballofwax.co.nz/2011/12/15/fixing-whitespace-when-apply-patches-with-git/

http://jyx.github.io/blog/2012/03/09/apply-patches-in-git/

https://makandracards.com/makandra/11541-how-to-not-leave-trailing-whitespace-using-your-editor-or-git

https://robots.thoughtbot.com/send-a-patch-to-someone-using-git-format-patch

http://gitster.livejournal.com/28309.html

https://davidwalsh.name/git-export-patch

http://nithinbekal.com/posts/git-patch/

http://git-extensions-documentation.readthedocs.io/en/latest/patches.html

https://kennyballou.com/blog/2015/10/art-manually-edit-hunks/

https://www.kernel.org/pub/software/scm/git/docs/git-apply.html

http://www.olitreadwell.com/2014/12/27/git-commit-interactivity/

https://git-scm.com/docs/diff-generate-patch

https://www.kernel.org/pub/software/scm/git/docs/git-rerere.html

https://www.codementor.io/citizen428/git-tutorial-10-common-git-problems-and-how-to-fix-them-aajv0katd

https://confluence.atlassian.com/bitbucketserverkb/pushing-to-bitbucket-server-reports-there-are-too-many-unreachable-loose-objects-825788622.html

http://legacy.python.org/dev/peps/pep-0103/

https://www.quora.com/In-a-git-merge-conflict-how-do-I-tell-git-that-for-files-X-Y-and-Z-I-want-it-to-screw-the-local-changes-and-simply-overwrite-with-the-version-being-pulled-in

http://genomewiki.ucsc.edu/index.php/Resolving_merge_conflicts_in_Git

https://git-scm.com/docs/merge-strategies

http://www.drdobbs.com/tools/three-way-merging-a-look-under-the-hood/240164902

http://blog.ezyang.com/2010/01/advanced-git-merge/

https://ariya.io/2013/09/fast-forward-git-merge

https://git-scm.com/docs/git-merge-file

http://blog.ezyang.com/2011/07/synthetic-git-merges/

http://www-cs-students.stanford.edu/~blynn/gitmagic/ch07.html

https://stackoverflow.com/questions/26157114/some-choices-in-interactive-mode-dont-work-on-git

https://wiki.freebsd.org/GitConversion

https://www.devroom.io/2010/06/10/cherry-picking-specific-commits-from-another-branch/

https://ninc.centreforbrainhealth.ca/sites/default/files/pictures/git.pdf

http://www.gelato.unsw.edu.au/archives/git/0512/13748.html

https://www.slideshare.net/wjmuse/git-35996727

https://www.slideshare.net/JosManuelVegaMonroy/git-session20122013-18929189

http://gitpython.readthedocs.io/en/stable/reference.html

https://dyerlab.ces.vcu.edu/2016/06/22/google-drive-git/

https://en.wikibooks.org/wiki/Git/Internal_structure

https://git-scm.com/book/en/v1/Git-and-Other-Systems-Git-and-Subversion

https://blog.ostermiller.org/git-remove-from-history

https://en.wikibooks.org/wiki/Commit_Often,_Perfect_Later,_Publish_Once:_Git_Best_Practices

https://sethrobertson.github.io/GitBestPractices/

http://blog.kablamo.org/2013/12/08/git-restore/

https://stackoverflow.com/questions/6531241/how-to-use-expect-and-git-clone?rq=1

https://www.atlassian.com/blog/git/extending-git

https://easyengine.io/tutorials/git/git-resolve-merge-conflicts/

https://git.wiki.kernel.org/index.php/Aliases

http://www.cirosantilli.com/git-tutorial/

https://git-scm.com/docs/revisions

https://github.com/bricoleurs/bricolage/wiki/Merging-with-Git

https://www.quora.com/In-a-git-merge-conflict-how-do-I-tell-git-that-for-files-X-Y-and-Z-I-want-it-to-screw-the-local-changes-and-simply-overwrite-with-the-version-being-pulled-in

http://gitolite.com/detached-head.html

http://www.it3.be/2014/05/07/git-head-detached/

https://www.alexmoreno.net/head-detached-originmaster

https://git-scm.com/docs/git-checkout#_detached_head

https://confluence.atlassian.com/bitbucketserver/using-smart-commits-in-bitbucket-server-802599018.html

https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/diff/%7Bspec%7D

https://confluence.atlassian.com/bitbucketserverkb/all-bitbucket-server-knowledge-base-articles-915145369.html

https://confluence.atlassian.com/bitbucketserverkb/understanding-diff-view-in-bitbucket-server-859450562.html

https://stackoverflow.com/questions/36727469/bitbucket-crlf-issue

https://mirrors.edge.kernel.org/pub/software/scm/git/docs/technical/api-index.html

https://libgit2.org/libgit2/

https://help.github.com/articles/error-permission-denied-publickey/

https://coderwall.com/p/ovjobq/git-merge-strategy-if-you-have-a-conflict

https://ikriv.com/blog/?p=2419

https://verboselogging.com/2010/06/25/copy-merge-with-git

https://blog.tankywoo.com/2014/05/20/git-merge-strategy-ours-and-theirs.html

https://www.reddit.com/r/programming/comments/kt058/gits_merge_recursive_strategy_explained/

https://git.seveas.net/the-meaning-of-refs-and-refspecs.html

https://medium.com/@Sergeon/using-javascript-in-your-git-hooks-f0ce09477334

https://aboullaite.me/deep-dive-into-git-git-refs/

http://gitolite.com/tips-3.html

https://help.github.com/articles/ignoring-files/

http://www.codeblocq.com/2016/01/Untrack-files-already-added-to-git-repository-based-on-gitignore/

https://www.atlassian.com/git/tutorials/saving-changes/gitignore

https://stackoverflow.com/questions/7751555/how-to-resolve-git-stash-conflict-without-commit

https://stackoverflow.com/questions/16190387/when-applying-a-patch-is-there-any-way-to-resolve-conflicts

https://git-scm.com/book/en/v1/Git-Tools-Stashing

https://www.oliverdavies.uk/blog/git-format-patch/

https://git.kernel.org/pub/scm/git/git.git/plain/Documentation/SubmittingPatches?id=master

https://makandracards.com/makandra/2521-git-how-to-create-and-apply-patches

https://www.tutorialspoint.com/git/git_patch_operation.htm

https://www.lullabot.com/articles/git-best-practices-upgrading-the-patch-process

https://www.usna.edu/Users/cs/aviv/classes/si485h/s17/submit.html

https://cbx33.github.io/gitt/chap8-6.html

https://jaytaylor.com/notes/node/1475947476000.html

https://www.drupal.org/node/1129120

https://help.github.com/articles/ignoring-files/

https://git-scm.com/docs/gitignore

https://www.atlassian.com/git/tutorials/using-branches/merge-strategy

https://www.oreilly.com/library/view/git-pocket-guide/9781449327507/ch11.html

https://kernelnewbies.org/FirstKernelPatch

https://hugogiraudel.com/2014/03/17/git-tips-and-tricks-part-2/

Config

https://git-scm.com/docs/git-config

http://web.mit.edu/jhawk/mnt/spo/git/www/git-config.html

https://git-scm.com/docs/gitattributes

Worst Parts

https://unspecified.wordpress.com/2010/03/26/why-git-aint-better-than-x/

https://dev.to/ben/is-git-the-be-all-and-end-all-of-version-control-4lp

https://news.ycombinator.com/item?id=12621955

https://news.ycombinator.com/item?id=12622746

https://svnvsgit.com/

https://code.fb.com/core-data/scaling-mercurial-at-facebook/

https://www.reddit.com/r/PHP/comments/9m6csh/what_is_the_absolute_worst_and_still_around_today/

https://www.reddit.com/r/programming/comments/71btyi/perforce_vs_svn_vs_git_vs_hg_for_gamedev/

https://softwareengineering.stackexchange.com/questions/35413/should-i-understand-svn-before-i-jump-to-git

https://devblogs.microsoft.com/devops/supercharging-the-git-commit-graph-ii-file-format/

https://backlog.com/git-tutorial/rewriting-history/change-commit-using-rebase/

https://juderosario.com/2016/09/25/gitting-the-commit-message-right/

https://help.github.com/en/articles/changing-a-commit-message

https://tickets.suresupport.com/faq/article-1905/en/using_git_to_push_changes_to_your_live_website

http://nicolasgallagher.com/git-checkout-specific-files-from-another-branch/

SSH

OAuth

URLs

  • /settings/personal-access-tokens
  • /settings/apps
  • /settings/installations

Git Submodules

Add via SSH

git submodule add [email protected]:myorg/myrepo.myreporepo.git

Add to system path:

import sys
sys.path.append("pathToProjectB")

Update the pip/poetry install to install the dependencies of the submodule

Tutorials

READMEs

Git Workflows (GitFlow, GithubFlow, GitlabFlow)

Github API

Response Logic

GitHub uses a 404 Not Found response instead of a 403 Forbidden response to avoid confirming the existence of private repositories.

Troubleshooting

⚠️ **GitHub.com Fallback** ⚠️