logging my workflow - luminize/subtree GitHub Wiki
Note
|
This is the log of me, trying to fit change the way of documenting for the Machinekit project. With this I’m testing the workflow for enhancing the documentation. |
I made 3 git repositories on github/luminize
-
upstream
-
enhancement
-
subtree
Locally I made 3 directories files in a git repo and added /docs/src directory to upstream
Note
|
|
further the situation I made is:
-
upstream
has the remoteupstream
-
enhancement
has the remotesupstream-source
andenhancement
-
enhancement
has the branches-
upstream-branch
and is trackingupstream-source/master
-
master
and is trackingenhancement/master
-
subtree-branch
(in which this log is held). and is trackingenhancement/subtree-branch
-
switch to a branch with git branch checkout <branch name>.
and then
type git branch -u <remote name>/<branch name>
if you want to see which branch is tracking what type git branch -vv
it then will
give output like something like this in the enhancement
repo:
master c216105 [enhancement/master] add /docs and /docs/src with textfiles§
* subtree-branch 9c1645c [enhancement/subtree-branch] log: add more info about remote branches and tracking
upstream-branch 8216473 [upstream-source/master: ahead 2] log: add more steps and info
when some change is done in upstream
then the following must happen:
-
upstream/master
(a.k.a. upstream-source/master) pulled intoenhancement/upstream-branch
-
enhancement/master
is the branch to which updates and new stuff that is usable are are being applied fromenhancement/upstream-branch
-
then
-
change a file in local
upstream
-
push to
upstream
-
in local
enhancement/upstream-branch
pullupstream-source/master
-
in local
enhancement/master
rebase ontoenhancement/upstream-branch
-
then add a little correction into the new file
-
commit
-
in local
enhancement/subtree-branch
rebase untoenhancement/master
-
push both
subtree-branch
andmaster
to github.
here I’ll test how the renaming of .txt in enhancement/subtree-branch
will work
with changes from upstream. So the same as the next test, but at the same time a
file is changed in upstream
i’ll rename a docyment in /docs/src
from the
enhancement/subtree-branch
.
see this file for the output of the split operation. Needs to be touched up
now there comes a time when changes need to be pushed to the subtree
repo.
I made a commit in enhancement/subtree-branch
in the /docs directory. for pushing to the subtree
remote
you need to do `git subtree push --prefix=<directory> <remote> <branch of remote>
Bass-MacBook-Pro-3:enhancement basdebruijn$ git subtree push --prefix=docs subtree master
git push using: subtree master
-n 1/ 5 (0)
-n 2/ 5 (0)
-n 3/ 5 (0)
-n 4/ 5 (1)
-n 5/ 5 (2)
Counting objects: 9, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 2.84 KiB | 0 bytes/s, done.
Total 7 (delta 4), reused 0 (delta 0)
To https://github.com/luminize/subtree.git
bfbee0d..d2c9f57 d2c9f57c23845c99970dcb626fb8f5dd9af27987 -> master
the next point will be me pulling the changes I do to this file on-line in subtree
repo.
you need to do git subtree pull --prefix=<directory> <remote> <branch of remote>
see output:
Bass-MacBook-Pro-3:enhancement basdebruijn$ git subtree pull --prefix=docs subtree master
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From https://github.com/luminize/subtree
* branch master -> FETCH_HEAD
d2c9f57..27c91be master -> subtree/master
Auto-merging docs/logging my workflow.asciidoc
CONFLICT (content): Merge conflict in docs/logging my workflow.asciidoc
Automatic merge failed; fix conflicts and then commit the result.
Bass-MacBook-Pro-3:enhancement basdebruijn$ git pull --abort
U docs/logging my workflow.asciidoc
Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>'
as appropriate to mark resolution, or use 'git commit -a'.
Bass-MacBook-Pro-3:enhancement basdebruijn$ git commit -a
[subtree-branch 25b478a] Merge commit '27c91beaaa5e53d7be9b1eca3c8b672d9b14001e' into subtree-branch
I'll try once again to change in the github environment in `subtree
, commit and pull back locally in enhancement/subtree0branch
I keep getting merge conflicts when pulling subtree
into enhancement/subtree-branch
. I’ll try again, but then in the subtree
which was split
when adding the original stuff back into the enhancement
repo.
I need to pull when I’m into the enhancement/subtree
branch which was created at the time of the originial adding of the subtree to the repo
== easy adding to the documentation
If I am correct then the "/docs" should go als in subtree.wiki.git as that will
be easily modified by other people. I will test this later.
Then modifications from Github can be pulled into subtree
test for inter document linking asciidoc markup split operation