Git notes
-- 2017-12-04 Monday - somvaar - सोमवार--
Git Notes
^ OVERVIEW - अवलोकन
Following article / document collection of notes on version control software named git. Worth noting at top of these notes is an nvie.com blog post about practical and widespread git branching strategy, at https://nvie.com/posts/a-successful-git-branching-model/.
^ How To Use Git
Wanting to understand and use git better, here are some on-line references to git version control. Noting here git reference at orga.cat, this reference well-written with lots of commands and concise explanations of each command. This reference is first in list:
Basic git commands:
- Most useful git commands - Orga.cat
- Basic git commands by Micheal Herman
- Example stash with helpful options: $ git stash save --include-untracked --keep-index
- https://www.atlassian.com/git/tutorials/merging-vs-rebasing . . . found by Rafael
2020-05-06
- https://www.tutorialspoint.com/git/git_patch_operation.htm Git patch commands, found by Joel Hart
Atlassian article on Git's edit/stage/commit pattern of use (Invoke `git add` to stage local file changes.):
Setting up ssh key pairs for secure authentication:
- https://help.github.com/en/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent . . . generate new key and add key to ssh-agent
Why are my local changes getting lost? Git commit-and-push-sequence not sufficient to transfer file changes to given git repository . . .
- [1] git merging
- git merge and rebase commands
- git stage, commit, push on command line
- git 'commit' akin to traditional 'save file', Subversion model versus Git model
Git references found while answering specific git task questions:
- Create new git repository by Karl Broman
- Add existing project to Github
- rename a file under Git version control
- git-diff
$ git diff HEAD .
2022-01-10 Commands in `git` to rename local and remote branch:
ejemplo - board `anda-m`:
1 2003 git checkout andam-board-bring-up 2 2004 git branch -m anda-m-board-bring-up 3 2005 git branch 4 2006 git push origin -u anda-m-board-bring-up 5 2007 git push origin --delete andam-board-bring-up 6 2008 history
Markdown and .md file formatting at Github
Git and Working with Remote Repositories
Release tag creation and naming in Git
^ Git Command Examples
On the local work station, to see from which remote git repository a working copy comes:
$ git remote -v
^ Git Terminology
What it means to 'rebase' in context of git . . .
* https://git-scm.com/docs/git-rebase
^ Git Branching
An official starting point for git branch use can be found at https://git-scm.com/docs/git-branch. Some articles on the large topic of best branching practices include:
- https://git-scm.com/book/en/v2/Git-Branching-Branching-Workflows
- https://dev.to/zenulabidin/git-branches-best-practices-46oo
- https://nvie.com/posts/a-successful-git-branching-model/ <-- This nvie.com article excellent git resource!
When there are local changes that haven't been committed . . .
* https://stackoverflow.com/questions/20568971/git-pull-keeps-telling-me-to-stash-local-changes-before-pulling
Excerpt from above link:
It sounds like your local branch does not have all of the changes on origin. Firstly, stash your changes git stash Then, pull in the changes from origin. git fetch origin && git rebase origin/(branch name) Next, add the stash back in to your working directory: git stash pop
Renaming local and remote branches:
0404
^ Git remotes
Working with multiple git remotes , remote repositories. The following tutorial link to Jigarius leads to a good article. In attempting to set up a local git remote 'definition' with two remote URLs, it became clear that there are issues that break this effort when one remote repo is already created and has pre-existing history. It doesn't matter how short or simple that history is. So this is a good link, but may not be practical to set up multiple remotes to be updated with a single 'push' command when the remotes are not all fully under a given developer's control:
So another question which this prompts, this being the effort to push local work to multiple remotes, is: how does git handle symbolic links? Links at least in the Unix and Linux context?
On git handling of symlinks:
Adding ssh keys to ssh-agent, listing ssh keys, configuring multiple github emails:
^ Using Git and Subversion Together
Using Git and Subversion on one and the same project looks complicated . . .
^ Git For Windows notes
Looks like with latest (as of 2021-06-16) Git For Windows offers three different ways to configure credentials management. This seems important, here is a link provided by the Git-for-Windows installer:
Locally installed release notes at: file:///C:/Users/<user_name>/AppData/Local/Programs/Git/ReleaseNotes.html
^ References
Note: in Firefox 89.0.1 (64-bit) the key binding <CTRL>+j opens a message box showing download progress and history.