about summary refs log tree commit diff stats
path: root/dev/git/index.html
blob: ed64efa55bf87f6daca31b9495af369831aacaf5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
0.7.1 (2019-09-24)
=====

- Fix copyright/info displayed email
- Fix typos in OMEMO logs
- Fix crash when jid has no node part (#1153, #1193)

0.7.0 (2019-07-31)
=====

- Fix plugin unload return code if just one plugin fails (#995)
- Fix several typos
- Fix some display indentation issues (#1073)
- Fail plugin unload if the plugin doesnt exist
- Improve encrypted message stub header by mentioning the encryption method
- Fix GPG encryption (#997)
- Redraw sceen after entry of PGP key (#906)
- Fix support for case-sensitive account names (#725)
- Fix /me display when highlighting user in MUCs (#950)
- Fix `make dist` (0f0659a)
- Fix use after free bug (#1044)
- Fix segfault on connect with default account (#1046)
- Implement OMEMO support (#1039, #658, #1070)
- Add random string at the end of the default resource (#1053)
- Fix handling of messages without ID in MUC (#1061)
- Add library versioning to libprofanity (#973)
- Add more customization: occupants indent (/occupants) (#690, #1072)
- Add more customization: occupants header char (/occupants) (#690, #1074)
- Add more customization: occupants wrap (/occupants) (#690, 125ca2f)
- Add more customization: occupants char (/occupants) (#690, #1084)
- Fix formatting for privileges on (a666f0d)
- Fix usage of statusbar number in theme (#1078)
- Fix Debian 32bit tests (#1091)
- Fix unit tests (#1092)
- Fix infinite loop on connection loss (#1103)
- Don't clear saved account data in session_disconnect (#1106)
- Cancel autoping timer on disconnect or connection loss (#1105)
- Fix SIGABRT on connection loss (#1083)
- Only print room history for new messages upon reconnect (#704, #1110)
- Check if valid account before setting autoconnect (#1112)
- Improve plugin load error message, in case built without support (cc697de)
- Iterate up to 100 logfiles (#519)
- Fix rejoining of MUCs upon reconnect (#1120)
- Add option to set all window related time formats (#632, #1120)
- Always check for directory changes with sendfile auto completion (#1154)
- Fix several memory leaks (#1130, + plenty commits)
- For details see https://github.com/profanity-im/profanity/milestone/17

0.6.0 (2019-02-18)
=====

- Allow moving vertical window positions (/titlebar, /mainwin, /statusbar, /inputwin)
- Allow loading/unloading all plugins (/plugins)
- Allow installing plugins from directory (/plugins)
- Allow uninstallation of plugins (/plugins uninstall)
- Allow update of plugins (/plugins update)
- Theme option for status bar time (statusbar.time)
- Case/accent insensitive autocompletion
- Shift tab to select previous autocomplete suggestion
- Allow searching h
<!DOCTYPE html>
<html dir="ltr" lang="en">
    <head>
    <meta charset='utf-8'>
    <title>Git</title>
</head>
<body>

    <a href="../index.html">Development Index</a>
    <h1>Git</h1>

    <p>First configure your global identity, configuration
    file resides on ~/.gitconfig ;</p>

    <pre>
       $ git config --global user.name "User Name"
       $ git config --global user.email user@devbox
    </pre>

    <p>If you want to disable pager / paging you can set globally;</p>

    <pre>
    $ git config --global core.pager cat
    </pre>

    <p>Paging based on output size with less;</p>

    <pre>
    $ git config --global core.pager "less -F -X"
    </pre>

    <p>Use <a href="../../tools/vim.html#vimdiff">vimdiff</a> as diff and merge tool;</p>

    <pre>
    $ git config --global diff.tool vimdiff
    $ git config --global merge.tool vimdiff
    $ git config --global difftool.prompt false
    </pre>

    <h2 id="teamwork">1. Team WorkFlow</h2>

    <p>Assumptions of this document;</p>

    <ul>
        <li>Correct
            <a href="../tools/gitolite.html#adminusers">user account</a>
            exists on git server or is public readable.
        </li>
        <li>Repository exists or
            <a href="../tools/gitolite.html#adminrep">create one</a>
            if you have permissions. This document uses atom as example.
        </li>
        <li>Correct
            <a href="../tools/openssh.html#sshid">ssh identities</a>,
            and profile alias have been setup. This document uses devbox as example.
        </li>
    </ul>

    <pre>
       $ git clone devbox:atom
       $ git remote -v
    </pre>

    <p>This work flow is based on
    <a href="http://nvie.com/posts/a-successful-git-branching-model/">Vicent Driessen</a>
    development model, it defines rules how branches are forked,
    merged and tagged. By having well defined set of branches,
    the project structure is used as a communication tool,
    allowing to work simultaneously on different stages
    of the development.</p>

    <p>Main Branches;</p>

    <pre>
    ___A___________AB_____ Master
        \___B_____/ \____  Develop

    </pre>

    <dl>
        <dt>master</dt>
        <dd>Current official stable release history.</dd>
        <dt>develop</dt>
        <dd>Integration branch for features.</dd>
    </dl>

    <p>Add-on Branches;</p>

    <pre>
    _A_________________AFR___________________AFRHR Master
     \            _AFR_/   \        _AFRHR_/\      Release
      \          /          \_AFRH_/         \     Hotfix
       \________/_____________________________\__  Develop
         \_F_/     \_F1_/                          Feature

    </pre>

    <dl>
        <dt>feature (f-)</dt>
        <dd>New features, improvement proposal, tests, etc...</dd>
        <dd>Only fork and merge from/to develop.
        <dt>release (r-)</dt>
        <dd>Next release, new features not allowed.</dd>
        <dd>Fork from develop, merges to master and develop.</dd>
        <dt>hotfix (h-)</dt>
        <dd>Hotfix only contain isolated bugfixes.</dd>
        <dd>Only fork from master, merges back to master and develop.</dd>
    </dl>

    <p>
    <h3 id="feature">1.1. Feature</h3>

    <p>Create a branch featurex from develop and checkout;</p>

    <pre>
    $ git checkout -b featurex develop
    </pre>

    <p>Push new branch to server</p>

    <pre>
    $ git push -u origin featurex
    </pre>

    <p>Rename a branch, if all feature branches start by "f-" is easy
    and quick to type and easy to spot;</p>

    <pre>
    $ git branch -m featurex f-xpto
    </pre>

    <p>Rename remote branch;</p>

    <pre>
    $ git push origin :featurex f-xpto
    $ git push origin -u f-xpto
    </pre>

    <p>Merge branch feature into develop;</p>

    <pre>
    $ git checkout develop
    Switched to branch 'develop'
    $ git merge --no-ff f-xpto
    Updating ea1b82a..05e9557
    (Summary of changes)
    $ git push origin develop
    </pre>

    <p>Delete Local;</p>

    <pre>
    $ git branch -D f-xpto
    </pre>

    <p>Delete Remote</p>

    <pre>
    $ git push origin :f-xpto
    </pre>

    <h3 id="release">1.2. Release</h3>

    <p>Software release numbers follow <a href="http://semver.org/">Tom Preston-Werner</a>
    description;</p>

    <pre>
    software-name-X.Y.Z.tar.xz
    </pre>

    <dl>
        <dt>X</dt>
        <dd>Major version, backwards incompatible API changes.</dd>
        <dt>Y</dt>
        <dd>Minor version, backwards-compatible changes.</dd>
        <dt>Z</dt>
        <dd>Patch version, backwards-compatible bug fixes.</dd>
    </dl>

    <pre>
    $ git checkout -b r-1.2.1 develop
    Switched to a new branch "release-1.2.1"
    $ ./bump-version.sh 1.2.1
    Files modified successfully, version bumped to 1.2.1.
    $ git commit -a -m "Bumped version number to 1.2.1"
    [release-1.2 74d9424] Bumped version number to 1.2.1
    1 files changed, 1 insertions(+), 1 deletions(-)
    </pre>

    <p>Only documentation or bugfixes are allowed in this
    branch. When release is ready for production merge
    and push to master;</p>

    <pre>
    $ git checkout master
    Switched to branch 'master'
    $ git merge --no-ff r-1.2.1
    Merge made by recursive.
    </pre>

    <p>Tag new release with software-name-version, this
    allows meaningful ports
    <a href="../core/ports.html">distfiles</a> when
    downloading releases from git archives;</p>

    <pre>
    $ git tag -a software-name-1.2.1
    $ git push --follow-tags
    </pre>

    <p>Update branch develop with bugfixes from last release,
    conflict will happen in next step</p>

    <pre>
    $ git checkout develop
    Switched to branch 'develop'
    $ git merge --no-ff r-1.2.1
    Merge made by recursive.
    (Summary of changes)
    $ git push
    </pre>

    <h3 id="tags">1.3. Tags</h3>

    <p>There are two main types of tags, lightweight and
    annotated. Lightweight tag is a pointer to a specific commit,
    much like cheap branches. Annotated tags are stored as full objects
    and allow to sign with <a href="gnupg.html">gnupg</a>, making it ideal
    for distributing releases.</p>

    <p>Delete local and remote last end of life version;</p>

    <pre>
    $ git tag -d software-name-0.0.12
    $ git push origin :refs/tags/software-name-0.8
    </pre>

    <p>Checkout master commit you want to start long term support and then;</p>

    <pre>
    $ git tag -m "this commit is tagged" -a "software-name-1.1.8"
    $ git push --follow-tags
    </pre>

    <h3 id="hotfix">1.4. Hotfix</h3>

    <p>This branch should never exist, ;)</p>

    <pre>
    $ git checkout -b h-1.2.2 master
    $ ./bump-version.sh 1.2.2
    Files modified successfully, version bumped to 1.2.2
    $ git commit -a -m "Bumped version number to 1.2.2"
    </pre>

    <pre>
    $ git merge --no-ff b-error-xpto
    ...
    $ git merge --no-ff b-error-xpto
    ...
    $ git commit -m "Commit severe fix"
    ...
    $ git commit -m "Commit severe fix"
    ...
    </pre>

    <pre>
    $ git checkout master
    Switched to branch 'master'
    $ git merge --no-ff h-1.2.2
    Merge made by recursive.
    (Summary of changes)
    $ git tag -a software-name-1.2.2
    </pre>

    <p>Conflict will happen in next step</p>

    <pre>
    $ git checkout develop
    Switched to branch 'develop'
    $ git merge --no-ff h-1.2.2
    Merge made by recursive.
    (Summary of changes)
    </pre>

    <pre>
    $ git -D h-1.2.2
    </pre>

    <h2 id="local">2. Local Workflow</h2>

    <h3 id="working">2.1. Working area</h3>

    <p>Mark all deleted to commit;</p>

    <pre>
    $ git ls-files --deleted -z | xargs -0 git rm
    </pre>

    <p>Query last commit that affected current file path</p>

    <pre>
    $ git rev-list -n 1 HEAD -- .
    $ git show f000 path/to/file
    $ git diff --name-status f000 path/to/file
    </pre>

    <p>Undo a file to specific commit</p>

    <pre>
    $ git checkout f000^ -- path/to/file
    </pre>

    <p>Join multiple commits into single one;</p>

    <pre>
    $ git log --oneline
    $ git rebase -i oldest_commit_to_rewrite
    </pre>

    <h3 id="logdiff">2.2. Logs, diff commits</h3>

    <p>Create patch files to target branch/tag/ref;</p>

    <pre>
    $ git format-patch --no-prefix software-v0.0.1
    </pre>

    <p>Same using diff command;</p>

    <pre>
    $ diff orig file > file.patch
    </pre>

    <h3 id="remote">2.3. Working with remotes</h3>

    <p>Adding a new remote;</p>

    <pre>
    $ git remote add newremotename https://machine.example.org/repo.git
    </pre>

    <p>Update all branches with remote;</p>

    <pre>
    $ git fetch --all
    $ git pull --all
    </pre>

    <p>If you want to track all remotes run this line
    and then the commands mentioned above;</p>

    <pre>
    $ for remote in `git branch -r`; do git branch --track ${remote#origin/} $remote; done
    </pre>

    <p>Future updates;</p>

    <pre>
    $ git fetch --all
    $ git pull --all
    </pre>

    <p>Update local branches removed on remote set;</p>

    <pre>
    $ git config --global fetch.prune true
    </pre>

    <p>This will prune on fetch or you can keep it manually;</p>

    <pre>
    $ git remote prune origin
    </pre>

    <a href="../index.html">Development Index</a>
    <p>This is part of the Hive System Documentation.
    Copyright (C) 2018
    Hive Team.
    See the file <a href="../../fdl-1.3-standalone.html">Gnu Free Documentation License</a>
    for copying conditions.</p>
</body>
</html>