T
Important: If there's a good chain of dependency management for your language, then the decision here is not to use. Because if it is, it's much easier to do from the foundation. Separate library and fix it like dependence♪ In Node.js - NPM-packet, Ruby - gem, PHP - Composer Package, Rust - crate, etc.It will be redundant and can add cotton to updates that can be avoided without using a control system for non-designed versions.git Maybe.I actually feel like git Maybe everything. I mean, the job mechanism isn't too simple, it needs to know how it works.Since git I'll swap your order of work. one local repository on several unconnected branches: a♪ b and master♪ Changes in these nets can come from other resonators (the different branches can follow different servers!) but using this technique, you have a local repository that has all three.Let's go.Let's put that down. git init You did, and C is in the branch. master (what is absolutely unnecessary).Establish a vault where different violin files will be available (e.g. A)We're doing an unconnected branch:git checkout --orphan a
We're clearing the folder and the index to start with the clean sheet:git reset && git clean -f
We're making a comedian with a fig.echo 'скрипт' | tee script_a_1 script_a_2
git add .
git commit # Тут вас попросят ввести сообщение для коммита
Repository where a standard set of files will be available to launch site programming (e.g. B)Same thing.git checkout --orphan b
git reset && git clean -f
echo 'скрипт' | tee script_b_1 script_b_2
git add .
git commit # Сообщение для коммита
When I create a new project, a new repository is being created (e.g. C).Let's assume it's a branch. master♪ And at the moment, it must be empty, git It means she doesn't exist, so we're gonna have to do it again:git checkout --orphan master
git reset && git clean -f
Now I need to reschedule the standard set from St. B.Murge:git merge b
It'll be fast-forward before b♪ master It'll match the branch. b♪ It's okay. I mean, at this stage, the project file system matches, right?Then I need to move two violets to C with A.Murge with abut this time with the brakes, just in front of the committ. git stopped:git merge --no-commit --no-ff a
Why? Then you don't need all the files. At this stage, you can remove the unnecessary index files from your index using reset, clean up the remaining and complete the results:git reset script_a_2
git clean -f
git commit
Now we're gonna work a little bit, for the species:echo work > work
git add work
git commit
Standard files (which are stored in B) have a mistake. I'm fixing her, and I want to spit like a B...Because you have (semitic) master based bAnd not the other way around, you have to fix that. bso that the change of "exploded" is not automatic! Let's go to the branch. b and fix:git checkout b # clean уже не нужен, т. к. ветка не пустая
echo script > script_b_1 # Ну, допустим, что кириллица не переварилась. Мало ли.
git add script_b_1
git commit
At this stage, if the repositories are b and master It must be different. git push branches b in the relevant repository and in the repository of the project git pull --ff-only (sighs)--ff-only He only lets the windshield... so that your changes don't go into the wind. bIn a branch that follows that repository. It's a separate subject, if you're interested, I'll tell you about it.♪ And C.We'll move into a project line:git checkout master
And we're doing a branch thing. b in the project.git merge b
Ready. Yeah, that's easy!After the above-mentioned manipulations, I got into master Committs diagramgit log --graph* commit 2e9219cb2922f70382a8f069fdc917bdbfccd4b8
|\ Merge: 2cc463a 1fc0b61
| | Author: Имя <адрес>
| | Date: Sun Dec 27 14:46:12 2015 +0300
| |
| | мердж фикса
| |
| * commit 1fc0b61c1017acf4b4ef1941e1cdcb01a7e86be4
| | Author: Имя <адрес>
| | Date: Sun Dec 27 14:41:23 2015 +0300
| |
| | фикс основы
| |
* | commit 2cc463ae97500bff4a304990aa4e42159da96fe9
| | Author: Имя <адрес>
| | Date: Sun Dec 27 14:38:37 2015 +0300
| |
| | работа
| |
* | commit cfa122c954f77b3282f51511f94bc6d97c95d569
|\ \ Merge: 7da066c f9304d8
| |/ Author: Имя <адрес>
|/| Date: Sun Dec 27 14:31:20 2015 +0300
| |
| | мердж с удалением лишних
| |
| * commit f9304d82d89600add270544bec32cd6661a8c150
| Author: Имя <адрес>
| Date: Sun Dec 27 13:46:39 2015 +0300
|
| скриптики
|
* commit 7da066c234216057ff19775a355342ed501fe9a4
Author: Имя <адрес>
Date: Sun Dec 27 13:54:01 2015 +0300
основа
And for the visual, I redefined: