From 553e350e13c8e9abf0a9732476db1dd7843b09a2 Mon Sep 17 00:00:00 2001
From: Silvino Prepare for testing and merge back; Prepare for testing and merge back; Rename remote branch; Rename remote branch; Merge branch feature into develop, first make sure is update with develop and history is clean; Merge branch feature into develop, first make sure is update with develop and history is clean; 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 gnupg, making it ideal
+ for distributing releases. Tag new release with projectname-version, this
- allows meaningful ports
- distfiles when
- downloading releases from git archives; Tags are used to mark patch releases, get back in time to make security patches or to mark a new major or minor new release. Tag new release with projectname-version, this allows meaningful ports distfiles when downloading releases from git archives; 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 gnupg, making it ideal
- for distributing releases. Tags are used to mark patch releases, get back in time to make security patches or to mark a new major or minor new release. Delete local and remote; Some times is useful to pick the last commit that affected a path on other branch. To achieve this first get last commit that affected the path; This is part of the Hive System Documentation.
Copyright (C) 2019
diff --git a/dev/git/index.html b/dev/git/index.html
index 463b506..9794890 100644
--- a/dev/git/index.html
+++ b/dev/git/index.html
@@ -33,6 +33,29 @@
+ Link to examples of following git commands. This is part of the Hive System Documentation.
diff --git a/dev/git/work.html b/dev/git/work.html
index 3111eaf..724df1c 100644
--- a/dev/git/work.html
+++ b/dev/git/work.html
@@ -10,58 +10,58 @@
Git is very easy to use and very useful to keep information in text or other formats. To start using just go to a directory where you will test git, add some files and;
+ Git is very easy to use and very useful to keep information in text or other formats. To start using just go to a directory where you will test git, add some files and;
This initiates git directory and configuration files for this repository, you can see new directory ".git/". The next command says the status of your working directory, since no files have been added it will report "untracked files"; This initiates git directory and configuration files for this repository, you can see new directory ".git/". The next command says the status of your working directory, since no files have been added it will report "untracked files"; Add all files to start tracking them; Add all files to start tracking them; Run again git status, it should report that new files have been added; If you change any file it will report that the file have been changed at this moment, new changes can be added to current state of the files for the next commit. To commit; If you change any file it will report that the file have been changed at this moment, new changes can be added to current state of the files for the next commit. To commit; Check ~/.bashrc for glog alias, help to check branches and their commit history; Check ~/.bashrc for glog alias, help to check branches and their commit history; Mark all deleted to commit; Mark all deleted to commit; Query last commit that affected current file path Query last commit that affected current file path Undo a file to specific commit Undo a file to specific commit Undo last commit; Undo last commit; Create patch files to target branch/tag/ref; Create patch files to target branch/tag/ref; Update all branches with remote; Update local branches removed on remote set automatically; If you want to track all remotes run this line
- and then the commands mentioned above; This will prune on fetch or you can keep it manually; Future updates; Update all branches with remote; Update local branches removed on remote set; If you want to track all remotes run this line
+ and then the commands mentioned above; This will prune on fetch or you can keep it manually; Future updates; When using gitolite as remote, check following documentation; This is part of the Hive System Documentation.
Copyright (C) 2019
Hive Team.
--
cgit 1.4.1-2-gfad0
From 3cce527807b5597108a8c8e34547f231f700d9f9 Mon Sep 17 00:00:00 2001
From: Silvino Utilities; Utilities;
$ git checkout featurex
@@ -115,14 +115,14 @@
$ git branch -m featurex f-xpto
-
$ git push origin :featurex f-xpto
$ git push origin -u f-xpto
-
$ git checkout featurex
@@ -190,11 +190,15 @@
$ git merge --no-ff r-1.2.0
Merge made by recursive.
+ 3.4. Tags
+
+
$ git tag -a projectname-1.2.0
@@ -213,16 +217,6 @@
$ git push
- 3.4. Tags
-
-
@@ -296,6 +290,15 @@
$ git -D h-error-name
+
+ $ git checkout upstream
+ $ git log -n 1 -- path/dir/or/file.c
+ $ git checkout stable-3.4
+ $ git cherry-pick 9ce8b280e7081ec3c122b228cfa76600251ea6c9
+
+
Git Index
+
+
Development Index
1. Work
-
-$ git init
+ $ git init
-
-$ git status
+ $ git status
-
-$ git add .
+ $ git add .
-$ git status
+ $ git status
-
-$ git commit -m "initial commit"
+ $ git commit -m "initial commit"
2.1. Local workflow
-
-# Git log
-glog () {
- git log --stat --decorate
-}
-# Git graph log
-gloga () {
- git log --graph --abbrev-commit --decorate --date=relative --all
-}
+ # Git log
+ glog () {
+ git log --stat --decorate
+ }
+ # Git graph log
+ gloga () {
+ git log --graph --abbrev-commit --decorate --date=relative --all
+ }
-
$ git ls-files --deleted -z | xargs -0 git rm
-
$ git rev-list -n 1 HEAD -- .
@@ -69,7 +69,7 @@ gloga () {
$ git diff --name-status f000 path/to/file
-
$ git checkout f000^ -- path/to/file
@@ -82,7 +82,7 @@ gloga () {
$ git rebase -i oldest_commit_to_rewrite
-
$ git reset --soft HEAD~1
@@ -90,7 +90,7 @@ gloga () {
- 2.2. Logs, diff commits
-
$ git format-patch --no-prefix software-v0.0.1
@@ -110,37 +110,37 @@ gloga () {
$ git remote add newremotename https://machine.example.org/repo.git
-
- $ git fetch --all
- $ git pull --all
+ $ git config --global fetch.prune true
-
- $ for remote in `git branch -r`; do git branch --track ${remote#origin/} $remote; done
+ $ git remote prune origin
-
$ git fetch --all
$ git pull --all
-
- $ git config --global fetch.prune true
+ $ for remote in `git branch -r`; do git branch --track ${remote#origin/} $remote; done
-
- $ git remote prune origin
+ $ git fetch --all
+ $ git pull --all
- aa-audit aa-disable aa-genprof aa-status
- aa-autodep aa-easyprof aa-logprof aa-unconfined
- aa-cleanprof aa-enabled aa-mergeprof
- aa-complain aa-enforce aa-notify
- aa-decode aa-exec aa-remove-unknown
-
+
+ aa-audit aa-disable aa-genprof aa-status
+ aa-autodep aa-easyprof aa-logprof aa-unconfined
+ aa-cleanprof aa-enabled aa-mergeprof
+ aa-complain aa-enforce aa-notify
+ aa-decode aa-exec aa-remove-unknown
+
Profiles
@@ -64,48 +64,48 @@
apparmor_parser;
- Usage: apparmor_parser [options] [profile] - - Options: - -------- - -a, --add Add apparmor definitions [default] - -r, --replace Replace apparmor definitions - -R, --remove Remove apparmor definitions - -C, --Complain Force the profile into complain mode - -B, --binary Input is precompiled profile - -N, --names Dump names of profiles in input. - -S, --stdout Dump compiled profile to stdout - -o n, --ofile n Write output to file n - -b n, --base n Set base dir and cwd - -I n, --Include n Add n to the search path - -f n, --subdomainfs n Set location of apparmor filesystem - -m n, --match-string n Use only features n - -M n, --features-file n Use only features in file n - -n n, --namespace n Set Namespace for the profile - -X, --readimpliesX Map profile read permissions to mr - -k, --show-cache Report cache hit/miss details - -K, --skip-cache Do not attempt to load or save cached profiles - -T, --skip-read-cache Do not attempt to load cached profiles - -W, --write-cache Save cached profile (force with -T) - --skip-bad-cache Don't clear cache if out of sync - --purge-cache Clear cache regardless of its state - --debug-cache Debug cache file checks - -L, --cache-loc n Set the location of the profile cache - -q, --quiet Don't emit warnings - -v, --verbose Show profile names as they load - -Q, --skip-kernel-load Do everything except loading into kernel - -V, --version Display version info and exit - -d [n], --debug Debug apparmor definitions OR [n] - -p, --preprocess Dump preprocessed profile - -D [n], --dump Dump internal info for debugging - -O [n], --Optimize Control dfa optimizations - -h [cmd], --help[=cmd] Display this text or info about cmd - -j n, --jobs n Set the number of compile threads - --max-jobs n Hard cap on --jobs. Default 8*cpus - --abort-on-error Abort processing of profiles on first error - --skip-bad-cache-rebuild Do not try rebuilding the cache if it is rejected by the kernel - --warn n Enable warnings (see --help=warn) -+ Usage: apparmor_parser [options] [profile] + + Options: + -------- + -a, --add Add apparmor definitions [default] + -r, --replace Replace apparmor definitions + -R, --remove Remove apparmor definitions + -C, --Complain Force the profile into complain mode + -B, --binary Input is precompiled profile + -N, --names Dump names of profiles in input. + -S, --stdout Dump compiled profile to stdout + -o n, --ofile n Write output to file n + -b n, --base n Set base dir and cwd + -I n, --Include n Add n to the search path + -f n, --subdomainfs n Set location of apparmor filesystem + -m n, --match-string n Use only features n + -M n, --features-file n Use only features in file n + -n n, --namespace n Set Namespace for the profile + -X, --readimpliesX Map profile read permissions to mr + -k, --show-cache Report cache hit/miss details + -K, --skip-cache Do not attempt to load or save cached profiles + -T, --skip-read-cache Do not attempt to load cached profiles + -W, --write-cache Save cached profile (force with -T) + --skip-bad-cache Don't clear cache if out of sync + --purge-cache Clear cache regardless of its state + --debug-cache Debug cache file checks + -L, --cache-loc n Set the location of the profile cache + -q, --quiet Don't emit warnings + -v, --verbose Show profile names as they load + -Q, --skip-kernel-load Do everything except loading into kernel + -V, --version Display version info and exit + -d [n], --debug Debug apparmor definitions OR [n] + -p, --preprocess Dump preprocessed profile + -D [n], --dump Dump internal info for debugging + -O [n], --Optimize Control dfa optimizations + -h [cmd], --help[=cmd] Display this text or info about cmd + -j n, --jobs n Set the number of compile threads + --max-jobs n Hard cap on --jobs. Default 8*cpus + --abort-on-error Abort processing of profiles on first error + --skip-bad-cache-rebuild Do not try rebuilding the cache if it is rejected by the kernel + --warn n Enable warnings (see --help=warn) +
Execute application with all common application options - and parts;
- -After initial automatic configuration enable profile in + and parts. After initial automatic configuration enable profile in complain mode. Use aa-logprof when rules need to be adapted.
- # aa-logprof + # aa-logprof -f /var/log/kernel
Once profile rules become well defined enable profile in @@ -137,6 +135,16 @@
Monitor logs with aa-notify;
++ # aa-notify --file=/var/log/kernel -u username -l ++ +
And keep adjusting the rules with logprof;
+ ++ # aa-logprof -f /var/log/kernel ++