In this "".You will be introduced to the importance of version control in workflows of Axslogic. GitLab is to be used as a collaboration tool( Hosted on our private network )
GIT: A version control system who maintains a record of changes to the code and other content.
git
intro
Have a look at the graphic above. Notice that in the example, there is a "central" version of our repository. intern, junior and senior … are all working together to update the central repository. Because they are using a distributed system, each user (intern, junior and senior) has their own copy of the repository and can contribute to the central copy of the repository at any time.
Humans make mistakes. A good thing about Git is that there's a little "undo" command for almost every situation. Correct your last commit because you forgot to include that small change. Revert a whole commit because that feature isn't necessary, anymore. And when the going gets tough you can even restore disappeared commits with the Reflog - because, behind the scenes, Git rarely really deletes something. This is the peace of mind.
Separation of concerns is paramount to keeping track of things. While you’re working on feature A, nothing (and no-one) else should be affected by your unfinished code. What if it turns out the feature isn’t necessary anymore? Or if, after 10 commits, you notice that you took a completely wrong approach? Branching is the answer to these problems. And while other version control systems also know branches, Git is the first one to make it work as it should: fast & easy.
Let's get some terms straight before we go any further.
Repository
They're easiest to imagine as a project's folder. A repository contains all of the project files (including documentation), and stores each file's revision history. Repositories can have multiple collaborators and can be either public or private.
- Central repository - the central repository is what all participants will add to. It is the "final working version" of the project.
- Your forked repository - is a "personal” working copy of the central repository stored in your GitLab account. This is called a fork. When you are happy with your work, you update your repo from the central repo, then you can update your changes to the central (Winnow) repository.
- Your local repository - this is a local version of your fork on your own computer. You will most often do all of your work locally on your computer.
Fork a Repository
A fork is a copy of the repo that you create in your own account. You can fork any repo at any time by clicking the fork button in the upper right-hand corner on gitlab. Forking a repository creates a copy of the repository on your account. We chose fork and clone over directly making more branches in the original repository because there are lots of branches on the winnow repo and we want to avoid further proliferation.
It can get confusing sometimes moving between a
A good way to figure out which repo you are viewing is to look at the name of the repo. Does it contain your username? Or your colleagues'? Or axslogic?
Your Fork vs the Central Repo
Your fork is an exact copy, or completely in sync with, the NEON central repo. You could confirm this by comparing your fork to the NEON central repository using the pull request option
The fork will remain in sync with the NEON central repo until:
So where will you push your edits?
––––––––––––––––––––––GitLab(Cloud)––––––––––––––––––––
Yes Files Names Can't say much so how to make things/folder readable to humans?
Markdown is a human-readable syntax for formatting text documents. Markdown can be used to produce nicely formatted documents including pdf's, web pages and more
Here we will talk about adding new edits or contents from your forked repo on gitlab and a central repo.
Once you've forked and cloned a repo, you are all set up to work on your project. You won't need to repeat those steps.
Tip:
A merge request to another repo is similar to a "push". However, it allows for a few things:
It allows you to contribute to another repo without needing administrative privileges to make changes to the repo.
It allows others to review your changes and suggest corrections, additions, edits, etc.
It allows repo administrators control over what gets added to their project repo.
The ability to suggest changes to ANY (public) repo, without needing administrative privileges is a powerful feature of Gitlab. In our case, you do not have privileges to actually make changes to the winnow repo. However, you can make as many changes as you want in your own fork, and then suggest that add those changes to their repo, using a merge request. Pretty cool!
transfer changes from our forked repo in our gitlab.com account to the central winnow Axslogic's repo. Adding information from your forked repo to the central repo in Gitlab is done using a pull request.