notes:git
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| notes:git [2023/08/30 11:46] – created - external edit 127.0.0.1 | notes:git [2024/02/28 09:54] (current) – [Create/Apply Patches] azman | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Git Stuff ====== | ====== Git Stuff ====== | ||
| - | From [[http:// | + | From [[https:// |
| //"Git is an open source, distributed version control system | //"Git is an open source, distributed version control system | ||
| - | Some useful configurations before starting with git. I have this simple script that I run on a new machine I want to work on. | + | Some useful configurations before starting with git. I have this [[https:// |
| - | <file bash gitstart> | + | |
| - | # | + | |
| - | + | ||
| - | # gitstart | + | |
| - | # - written by azman@my1matrix.net | + | |
| - | # - write basic git config setup | + | |
| - | + | ||
| - | GIT_NAME=${GIT_NAME: | + | |
| - | GIT_MAIL=${GIT_MAIL: | + | |
| - | + | ||
| - | git config --global user.name " | + | |
| - | git config --global user.email " | + | |
| - | git config --global color.diff auto | + | |
| - | git config --global color.status auto | + | |
| - | git config --global color.branch auto | + | |
| - | git config --global color.ui auto | + | |
| - | if [ -f / | + | |
| - | # only on slackware? some viewing problems (less environment? | + | |
| - | git config --global core.pager "less -FXRS" | + | |
| - | fi | + | |
| - | </ | + | |
| - | + | ||
| - | Note: Set the environment variable //VISUAL// to your favorite console editor... I use $(which vim). OR, use < | + | |
| ===== Create, Clone, Add, Commit ===== | ===== Create, Clone, Add, Commit ===== | ||
| Line 49: | Line 26: | ||
| Create formatted patches (note: sha1id1..sha1id2 is the range of commits used to create patches) < | Create formatted patches (note: sha1id1..sha1id2 is the range of commits used to create patches) < | ||
| To rename created patch(es) with commit timestamp < | To rename created patch(es) with commit timestamp < | ||
| - | To apply the patches (stopping on error) < | + | To apply the patches (stopping on error) < |
| ===== Branching/ | ===== Branching/ | ||
| Create new local branch < | Create new local branch < | ||
| - | Delete | + | Remove |
| Create a local branch to track remote branch < | Create a local branch to track remote branch < | ||
| Set current local branch to track a remote branch < | Set current local branch to track a remote branch < | ||
| Line 153: | Line 130: | ||
| < | < | ||
| - | Delete | + | Remove |
| < | < | ||
| - | If the remote branch has been deleted, use this to delete | + | If the remote branch has been removed, use this to remove |
| < | < | ||
notes/git.1693367201.txt.gz · Last modified: by 127.0.0.1
