📚 node [[git]]

Local Git Exclude

Edit the local exclude file in your git repo without having to edit the global .gitignore

.git/info/exclude

Source: StackOverflow

Counting files in a git repo

git ls-files | wc -l

Source: Stackoverflow

Git is a popular version control system.

Tricks

Writing a Git Commit Message

Article Reference

  • Concise and consistent length and form
  • Communicate clear context about a change to fellow developers. Ensure that other developers understand why a change was made.

Rules

  • Separate subject from body with a blank line if the body is to be used.
  • Limit subject line to 50 characters
  • Capitalize subject line
  • Do not end with period
  • Use imperative mood; I 'do' this. Rationale: If applied, the commit will change these aspects of the code. Git's own built-in conventions use this form.
  • Wrap at 72 characters
  • Use the body to explain 'what' and 'why' as necessary

Organization Thoughts

github organization:

  • one repo per course - as most courses require partner work

= repo for coding challenge practice problems

  • managing research notes: ??? i am thinking a single org file for all of this
  • - that is, an org file in each project for the research notes pertaining to that project,
  • - and anotherorg file for misc. research ?? i will have to see how my research is used

https://danieltakeshi.github.io/2017/07/15/how-i-organize-my-github-repositories/

Rewriting

It's a good idea to reformat commits to make them more readable.

git reset HEAD~${number of commits to go back}

Tricks

http://joeyh.name/blog/entry/how_to_publish_git_repos_that_cannot_be_republished_to_github/ :: cheeky way to abuse DMCA to avoid GitHub using your Git repos https://sourcehut.org/blog/2020-10-29-how-mailing-lists-prevent-censorship/ using the mailing list model over the built-in issue model, and how this naturally federated and local first procedure is superior to github's standard issue approach https://sagegerard.com/git-debugging.html: use git bisect while referencing maintainers of specific parts of code to narrow down to the code you should care about, then ask the maintainers about it - while putting in a minimum of effort. https://labs.consol.de/development/git/2017/02/22/gitignore.html using .gitignore the right way

Patch previous commits with rebases

https://stackoverflow.com/questions/9103396/how-do-i-edit-a-previous-git-commit If you need to change commit history:

  • Make another commit to make the change
  • Rebase starting at the commit you want to change
  • Squash the new commit with the old one in the history
  • Remove the second commit message (or merge it…)

This did change the commit time for my latest commit, which is something to watch out for.

How Git Works

Neat writeup on the Git patience diff algorithm "Distributed, offline-first bug tracker embedded in git, with bridges" Prototype Git GUI for Filmmaking "Pull github, bitbucket, and trac issues into taskwarrior" Text-mode interface for git bcongdon/git-trophy: ? Create a 3D Printed Model of Your Github Contributio

Worktrees

  • A git repository can have multiple working trees - allowing you to check out more than one workspace at a time!
    • Among other things, this allows you to work on multiple branches at once without having multiple copies of the file, and maps git branches or tags to other directories on your system. Use it to check on different efforts on projects without messing up your current editing environment - to look at code from other branches locally and simultaneously, for example!
  • `git worktree add $PATH` :: Adds a new branch with a name associated with the final component of $PATH. `git worktree remove` and `git worktree prune` both allow you to cut off external worktrees.
  • Flow example: latest develop, latest branch of work, and a third for reviewing pull requests and/or the work from other developers.

Github

track changes to a patch over time git flow: git extensions for high level repository operations explore git cli with natural language search github is sinking

READMEs

A curated list of awesome Github Profile READMEs 📝 https://github.com/pifafu/pifafu/blob/main/readME.md i love the font choice and the gif here!

Code Review

How to do a code review | eng-practices

Alternatives

fossil
git with additional features such as task management. it seems like a superset of git's system. Fossil vs. Git Incrementally converting from git to fossil while working on the git repo

repo
Google's tool for managing monorepos.

Pijul
A distributed version control system

Bazaar
Canonical's version control system

Table of Contents

[2020-04-19] The Communicative Value of Using Git Well – Math ∩ Programming [[git]]

[2017-05-06] use hg-fast-export to convert [[mercurial]] [[git]]

[2016-09-07] git stores snapshots, not diffs [[git]]

Different from SVN
It is important to note that this is very different from most SCM systems that you may be familiar with. Subversion, CVS, Perforce, Mercurial and the like all use Delta Storage systems - they store the differences between one commit and the next.
Git does not do this - it stores a snapshot of what all the files in your project look like in this tree structure each time you commit. This is a very important concept to understand when using Git.
Git’s pack files are carefully constructed to effectively use disk caches and provide “nice” access patterns for common commands and for reading recently referenced objects.

NOCOMMIT global hook? [[git]]

[2019-08-18] Highlights from Git 2.23 - The GitHub Blog [[git]]

https://github.blog/2019-08-16-highlights-from-git-2-23/

You may have used git grep to search for some text in your Git project, just as you may have used git diff to view active changes. What do the two have in common? They both display some contents in your repository, and both have support to show the surrounding function context with -p (short for --show-function) or -W (short for --function-context), respectively.

Git blame ignore formatting [[git]]

Configure your git blame to ignore cleanup changes.

https://www.moxio.com/blog/43/ignoring-bulk-change-commits-w

[2019-08-24] Fossil Versus Git | Lobsters [[git]]

https://lobste.rs/s/e3blgf/fossil_versus_git

This article is getting a few things about git wrong. They claim git only supports ‘One check-out per repository’. Heard of git worktree?

My unorthodox, branchless git workflow | Lobsters [[git]]

Git revise is especially useful for this commit stack workflow, as I call it. I’m a huge fan.

It’s a better rebase. So much better that it should be obligatory. You can split commits, batch rename them, and you don’t have to stash your work first.

a page with my favourite git commands & tricks? [[git]] [[toblog]] [[exobrain]]

wsdiff
image diff
nbstirpout
iadd
extra worktree dir

The Communicative Value of Using Git Well – Math ∩ Programming [[git]]

I’ve written up my ideas, under the name ‘Literate Git’, at https://github.com/bennorth/literate-git if you’re interested.
The tool I wrote turns a structured git history into an interactive web page.
There’s an example there of how the ideas might work in a tutorial setting.
After I gave a talk on this work, one of the people in the audience tried it with the Haskell LLVM tutorial: https://lukelau.me/kaleidoscope/

[2019-08-02] git - How do I remove a submodule? - Stack Overflow [[git]]

https://stackoverflow.com/questions/1260748/how-do-i-remove-a-submodule/21211232#21211232

git rm the_submodule
rm -rf .git/modules/the_submodule

[2019-12-11] git reflog expire –expire=now –all && git gc –prune=now –aggressive [[github]]

[2019-05-10] git rebase –committer-date-is-author-date –autostash HEAD~1 [[git]]

[2020-06-08] Learn to change history with git rebase!

[2018-11-28] extraction - How to extract one file with commit history from a git repo with index-filter & co - Stack Overflow [[git]]

https://stackoverflow.com/questions/7375528/how-to-extract-one-file-with-commit-history-from-a-git-repo-with-index-filter/37037151

git filter-branch --index-filter 'git read-tree --empty; git reset $GIT_COMMIT -- $your $files $here' -- --all --

[2019-04-10] set up git project commmand

[2020-07-12] - GitHub + why do we centralize issues, documents for a distributed version… | Hacker News

for an academic treatment of the defects in Git read: What's Wrong with Git? A Conceptual Design Analysis S. Perez De Rosso and D. Jackson. In Proceedings of the 2013 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming & Software (Onward! 2013) 

[2018-01-01] detect file type changes [[git]]

for r in *; do pushd $r; git whatchanged | grep "\.\.\..T"; popd; done

git ssh debugging [[git]] [[ssh]]

GIT_SSH_COMMAND='ssh -v' git fetch

[2021-01-11] How to keep your Git history clean with interactive rebase | GitLab

[2020-11-16] Why Git blame sucks for understanding WTF code (and what you should use instead) | Lobsters

For archeology I really love git gui blame despite its dated UI

[2019-07-21] git - How do I remove a submodule? - Stack Overflow https://stackoverflow.com/questions/1260748/how-do-i-remove-a-submodule/7646931#7646931 [[git]]

he majority of answers to this question are outdated, incomplete, or unnecessarily complex.

A submodule cloned using git 1.7.8 or newer will leave at most four traces of itself in your local repo. The process for removing those four traces is given by the three commands below:

Git is a [[pull" title="[[https://en.wikipedia.org/wiki/Distributed_version_control | distributed version control system]]" class="wikilink">distributed version control system]]. It stores //whole objects//, not diffs, which is one of the key differences between Git and other version control systems of its time. This [[speeds up operations]] like checking out branches and processing commits in batch. //Distributed// means that while you can have a single source of truth, nothing will break when it goes down, because [[the whole object database is stored on users' machines]], and [[data integrity is easily verified]] (commits can also be signed using OpenPGP).

=> https://git-scm.com | Official website

= Links => https://matrix.to/#/!ORfrUEFeWFcHAMLFLr:matrix.org/$1644101095103BLdVu:grin.hu?via=matrix.org&via=matrix.allmende.io&via=privacytools.io | Matrix message by @grin Péter Gervai:

That is probably an inherent lazyness of me, for example I passionately hate git and pretty much like mercurial, because the first was created by a dozen hackers to themselves, and nobody really understands it, and nobody else can really use it to its full potentials, and all the documentation and help pages are obscure, complex and generally written from the perspective of someone already knowing the system and being pretty annoyed that have to explain it to anyone else; mercurial on th eother hand has an excellend handbook, good structured help system, easy to use commands which can be very complex if someone take the time and efforts to learn it. And both systems are basically the same, do the same, using the same principles. The difference is the attitude towards the people not yet being fluent in the system. Also see: [[https://git-man-page-generator.lokaltog.net/]]

=> https://warmedal.se/~bjorn/posts/2021-09-20-finally-understanding-the-power-of-git.html | Finally Understanding the Power of Git

A platform like Github makes this different, in that it abstracts these tools into a web UI and expect all collaborators to have an account at the platform. The more I learn about ways of collaborating outside of a centralised service like that, the more I've come to dislike them. Decentralised collaboration is a lot more enjoyable and empowering.

=> https://blog.sulami.xyz/posts/cleaning-up-git-history/ | Cleaning Up Git History - sulami's blog

Cleaning up the history might seem tedious at first for marginal cosmetic benefits, but it gets much easier and faster with practice. Here I am collecting some tips for cleaning up a git commit history before publishing it to others, for example in the form of a pull request.

=> https://www.banterly.net/2021/07/31/new-in-git-switch-and-restore/ | New in Git: switch and restore

=> https://martowen.com/2016/05/01/git-submodules-vs-git-subtrees/ | Git Submodules vs Git Subtrees

Submodules are easier to push but harder to pull – This is because they are pointers to the original repository Subtrees are easier to pull but harder to push – This is because they are copies of the original repository

=> https://git-annex.branchable.com/

git-annex allows managing files with git, without checking the file contents into git. While that may seem paradoxical, it is useful when dealing with files larger than git can currently easily handle, whether due to limitations in memory, time, or disk space.

git-annex is designed for git users who love the command line. For everyone else, the git-annex assistant turns git-annex into an easy to use folder synchroniser.

=> https://ladycat.wordpress.com/2020/03/04/flashbake-автосохранение-в-git/ | Flashbake — автосохранение в git

Собственно, по-хорошему, тут надо начинать с того, что есть целая тема — «системы управления версиями», предназначенные вообще-то для программистов, но я уверена, что пишущим — не менее нужные. Из них я уже который год использую git.

=> https://ta180m.exozy.me/posts/gitea-actually-joins-the-fediverse/ | Gitea Actually Joins the Fediverse

Gitea federation development has reached a crucial milestone: federating with Mastodon! This is a //big deal//.

⥅ node [[git-alias]] pulled by user

Git Alias

⥅ node [[git-config]] pulled by user

Git Config

git config --local commit.template commit-template.txt
git config --global user.name "Flancian"
git config --global user.email "0@flancia.org"
⥅ node [[git-ship]] pulled by user
📖 stoas
⥱ context
⥅ related node [[occupy github]]
⥅ related node [[digital minimalism]]
⥅ related node [[digital gardens]]
⥅ related node [[a brief history & ethos of the digital garden]]
⥅ related node [[digital garden jekyll template]]
⥅ related node [[git bug]]
⥅ related node [[git siphon for moa party]]
⥅ related node [[githawk]]
⥅ related node [[github actions for jekyll]]
⥅ related node [[gitlab]]
⥅ related node [[mhawksey twitter archive github pages]]
⥅ related node [[micropub to github]]
⥅ related node [[pull github app]]
⥅ related node [[2002 12 23 digitalmass mitch kapor and chandler vs ms outlook]]
⥅ related node [[2003 03 12 vonage digital voice phone service]]
⥅ related node [[2004 01 13 arstechnica apple to manufacture hp branded digital music player]]
⥅ related node [[2004 01 13 ripdigital]]
⥅ related node [[2004 01 29 om malik tivo the digital hub powered by strangeberry]]
⥅ related node [[2004 03 07 digital web magazine in defense of fahrner image replacement]]
⥅ related node [[2004 03 11 digital web magazine optimizing your chances with accessibility]]
⥅ related node [[2007 10 15 more digital ethnography information r evolution video]]
⥅ related node [[2008 09 30 knight news challenge prep in vancouver digital media experiments to innovate journalism]]
⥅ related node [[git bug termui]]
⥅ related node [[git bug webui]]
⥅ related node [[github considered harmful]]
⥅ related node [[an analog guy in a digital world]]
⥅ related node [[beyond markdown and git]]
⥅ related node [[corporation for digital scholarship]]
⥅ related node [[digital art]]
⥅ related node [[digital bolo]]
⥅ related node [[digital commons coop]]
⥅ related node [[digital commons]]
⥅ related node [[digital garden configuration]]
⥅ related node [[digital garden standards]]
⥅ related node [[digital garden]]
⥅ related node [[digital gardeners]]
⥅ related node [[digital nation]]
⥅ related node [[discussing social annotation and digital literacies]]
⥅ related node [[flancia git]]
⥅ related node [[flancian git]]
⥅ related node [[git alias]]
⥅ related node [[git change remote]]
⥅ related node [[git config]]
⥅ related node [[git email]]
⥅ related node [[git on ipfs]]
⥅ related node [[git pull strategy]]
⥅ related node [[git rebase]]
⥅ related node [[git repository]]
⥅ related node [[git rere]]
⥅ related node [[git ship]]
⥅ related node [[git stoa]]
⥅ related node [[git sync]]
⥅ related node [[gitbug]]
⥅ related node [[gitea]]
⥅ related node [[github]]
⥅ related node [[gitjournal]]
⥅ related node [[gitpod garden]]
⥅ related node [[in flancia there are digital heterarchies]]
⥅ related node [[isomorphic git]]
⥅ related node [[markdown on git]]
⥅ related node [[moa git]]
⥅ related node [[obsidian git]]
⥅ related node [[roam to git]]
⥅ related node [[discrimination in digital finance]]
⥅ related node [[digital gardener taxonomy]]
⥅ related node [[from regurgitation to discovery]]
⥅ related node [[logits]]
⥅ related node [[sharing a jupyter notebook to github]]
⥅ related node [[ibm digital badge python for applied data science]]
⥅ related node [[digital_garden]]
⥅ related node [[gitea_federation]]
⥅ related node [[cross posting to git]]
⥅ related node [[gitlab pages]]
⥅ related node [[a brief history ethos of the digital garden]]
⥅ related node [[a socialist agenda for digital technology]]
⥅ related node [[adding an rss feed of recent activity to my org roam digital garden with org publish]]
⥅ related node [[adding flashcards to your digital garden with org roam and anki]]
⥅ related node [[adding planted and last tended dates to pages in my digital garden]]
⥅ related node [[against digital colonialism]]
⥅ related node [[an iterative enquiry diagram for digital ecosocialism]]
⥅ related node [[an iterative inquiry diagram for digital ecosocialism]]
⥅ related node [[appropriate digital]]
⥅ related node [[british digital cooperative]]
⥅ related node [[communicative socialism digital socialism]]
⥅ related node [[creating a digital commons]]
⥅ related node [[david bollier p2p models interview on digital commons]]
⥅ related node [[decentralized and rooted in care envisioning the digital infrastructures of the future]]
⥅ related node [[declaration of digital autonomy]]
⥅ related node [[decolonizing digital rights]]
⥅ related node [[digital action]]
⥅ related node [[digital activism]]
⥅ related node [[digital archaeology]]
⥅ related node [[digital architectures shadow all aspects of human life]]
⥅ related node [[digital autonomy]]
⥅ related node [[digital campfires]]
⥅ related node [[digital capitalism]]
⥅ related node [[digital cash]]
⥅ related node [[digital cold war]]
⥅ related node [[digital colonialism us empire and the new imperialism in the global south]]
⥅ related node [[digital colonialism]]
⥅ related node [[digital community wealth building]]
⥅ related node [[digital companies support other forms of unsustainable extraction]]
⥅ related node [[digital degrowth]]
⥅ related node [[digital democracy manifesto]]
⥅ related node [[digital divide]]
⥅ related node [[digital eco socialism]]
⥅ related node [[digital economy]]
⥅ related node [[digital ecosocialism breaking the power of big tech]]
⥅ related node [[digital ecosocialism]]
⥅ related node [[digital emancipation]]
⥅ related node [[digital environmental footprint legislation]]
⥅ related node [[digital fabrication]]
⥅ related node [[digital finance]]
⥅ related node [[digital freedom fund]]
⥅ related node [[digital gardening practice]]
⥅ related node [[digital gardens and systems thinking]]
⥅ related node [[digital gated community]]
⥅ related node [[digital inclusion needs to be locally embedded]]
⥅ related node [[digital inclusion risks being paternalistic]]
⥅ related node [[digital inclusion]]
⥅ related node [[digital literacy]]
⥅ related node [[digital means of production]]
⥅ related node [[digital neighborhood watch]]
⥅ related node [[digital non aligned movement]]
⥅ related node [[digital ocean]]
⥅ related node [[digital participation]]
⥅ related node [[digital parties]]
⥅ related node [[digital psychogeography]]
⥅ related node [[digital public assets]]
⥅ related node [[digital regulation]]
⥅ related node [[digital revolution]]
⥅ related node [[digital revolutions activism in the internet age]]
⥅ related node [[digital rewilding]]
⥅ related node [[digital rights management]]
⥅ related node [[digital rights]]
⥅ related node [[digital scarcity]]
⥅ related node [[digital self determination]]
⥅ related node [[digital self governance]]
⥅ related node [[digital socialism]]
⥅ related node [[digital sovereignty]]
⥅ related node [[digital taylorism]]
⥅ related node [[digital tech deal]]
⥅ related node [[digital technologies are an important part of movement infrastructure]]
⥅ related node [[digital technologies]]
⥅ related node [[digital technology]]
⥅ related node [[digital urban planning]]
⥅ related node [[digital welfare state]]
⥅ related node [[digital]]
⥅ related node [[digitalization and the anthropocene]]
⥅ related node [[digitalization]]
⥅ related node [[distributed digital gardens]]
⥅ related node [[dulongderosnay2020 digital commons]]
⥅ related node [[educate agitate organise]]
⥅ related node [[federated education new directions in digital collaboration]]
⥅ related node [[frantz fanon against facebook how to decolonize your digital mind]]
⥅ related node [[free software affords digital self governance]]
⥅ related node [[from cyber autonomism to cyber populism an ideological analysis of the evolution of digital activism]]
⥅ related node [[gitflow]]
⥅ related node [[github copilot]]
⥅ related node [[governable stacks against digital colonialism]]
⥅ related node [[greening government ict and digital services strategy 2020 2025]]
⥅ related node [[how does linking digital gardens facilitate a richer commons]]
⥅ related node [[agitate]]
⥅ related node [[is the phrase digital colonialism problematic]]
⥅ related node [[leveraging digital disruptions for a climate safe and equitable world the d 2s agenda]]
⥅ related node [[magit performance on minified js and css]]
⥅ related node [[magit]]
⥅ related node [[micropub to git]]
⥅ related node [[migrating wordpress sites to digital ocean]]
⥅ related node [[municipal digital sovereignty]]
⥅ related node [[nathan schneider on cooperatives and digital governance]]
⥅ related node [[neils digital garden]]
⥅ related node [[options for publishing an org roam based digital garden]]
⥅ related node [[organisational tech digital policies]]
⥅ related node [[platforming equality policy challenges for the digital economy]]
⥅ related node [[plotting the growth of my digital garden]]
⥅ related node [[provision a wordpress server at digital ocean]]
⥅ related node [[public civic collaboration coop incubators and stewarding digital infrastructure as a commons]]
⥅ related node [[public digital cooperative]]
⥅ related node [[publishing org roam via gitlab ci]]
⥅ related node [[receiving webmentions on my digital garden]]
⥅ related node [[recent activity in neils digital garden]]
⥅ related node [[reply to email questions about my digital garden]]
⥅ related node [[scorched earth beyond the digital age to a post capitalist world]]
⥅ related node [[shackles of digital freedom]]
⥅ related node [[should i send webmentions from my digital garden]]
⥅ related node [[solar energy for digital communication systems]]
⥅ related node [[syncing a git repo within a syncthing folder]]
⥅ related node [[the british digital cooperative a new model public sector institution]]
⥅ related node [[the digital revolution has failed]]
⥅ related node [[the digital sector under capitalism]]
⥅ related node [[the future of digital cooperatives]]
⥅ related node [[toward a digital economy that s truly collaborative not exploitative]]
⥅ related node [[tragedy of the digital commons]]
⥅ related node [[using firn for publishing my org roam digital garden]]
⥅ related node [[using ox hugo for publishing my org roam digital garden]]
⥅ related node [[using ssh keys in termux for git]]
⥅ related node [[vanguard stacks self governing against digital colonialism]]
⥅ related node [[what is true digital inclusion]]
⥅ related node [[whats the difference between digital commons and knowledge commons]]
⥅ related node [[demonstration of obsidian to github]]
⥅ related node [[digital garage]]
⥅ related node [[p grow a digital garden with chosen obsidian notes]]
⥅ related node [[plantey s digital garden]]
⥅ related node [[20210120225414 problems_of_digital_socialist_planning]]
⥅ related node [[agora git mapping]]
⥅ related node [[digital garden history]]
⥅ related node [[git hooks]]
⥅ related node [[git revert changes]]
⥅ related node [[agora digital garden]]
⥅ related node [[bhavagad gita]]
⥅ related node [[digital infrapuncture]]
⥅ related node [[git f]]
⥅ related node [[git lfs]]
⥅ related node [[neil s digital garden]]