Version Control System : about Git , Gogs , Gitea .
Hello World ,
I am Lazy Swapper, today We conducted Glug meet about Version Control System .
I am Lazy Swapper, today We conducted Glug meet about Version Control System .
What is “version control”, and why should you care?
Version control is a system that records changes to a file or set of
files over time so that you can recall specific versions later.
For the examples in this book, you will use software source code as the files being version controlled, though in reality you can do this with nearly any type of file on a computer.
For the examples in this book, you will use software source code as the files being version controlled, though in reality you can do this with nearly any type of file on a computer.
Consider you a part of a team creating website for your college event . you have been given a task to complete the frontend for a particular event . At the same time other members of the team will concentrate on some other work .
When you complete the system , you will share the folder with your team leader. He will be collecting it from you and from all others for their respective tasks . So there are many copies of the files occur in our system . Which may cause a mess with project .
Also consider a situation where we find that version 1 of the project works fine . We try to improve it using some addition and deletion of code , which may cause the whole system may fail to work with alignments or some other stuff .
We try to reduce all of these problem using GIT . To know the about how git was formed see here .
Git is the open source distributed version control system that facilitates GitHub activities on your laptop or desktop.
Now we will see about working of git .
Installation :
GitHub for Windows :
https://windows.github.com
There is a availability of git bash in windows :-)
GitHub for Mac :
https://mac.github.com
GitHub for GNU/linux:
You can use Git now.
Open Terminal , Copy & paste the following into the terminal window and hit
You can use Git now.
" Create a account in github.com "
CONFIGURE TOOLING
Configure user information for all local repositories
git config --global user.name "[name]"
git config --global user.email "[email address]"
Workflow of GIT :
To initialize git inside folder : git init
To add all the files to git : git add *
To commit the changes : git commit -m "First commit "
here m stands for message .
By default we will be on branch - Master . We can also create branches for several versions of our projects .
To know the status of the git : git status . By using it , it will also provide the branch of the system . ( Either master or some other )
To Create Branches : git branch <branch name>
To know the log of git : git log
It will display all the commits that are been held in the past .
To move to other branches : git checkout <branch name>
Eg : git checkout master .
When you find that your code works in other branches and you want to merge it with master : git merge <this branch> <that branch> .
Sometimes when interns are very excited and do not know what they are doing may cause ,
Actual GIT MERGER scenario is been explained here :
Want To Host your website for free - Here is GIT for you .
Create a repository with <username>.github.io then push all the html files to the repo . Be sure that index.html is the main html file .
Then push all the files and see your website live with url http://<username>.github.io .
You can also specify the domain name for free (Only for students) until you complete your course (Not taking consideration of arrears :-) ) .
Link to avail free domain name : https://www.namecheap.com/support/knowledgebase/article.aspx/9645/2208/how-do-i-link-my-domain-to-github-pages
For adding more website for different repo then add your web related files under gh-pages .
This is all about basics of git . But still Some people likes to travel by wooden wheels even when ola is available . Athatvathu "kaila venaiya vachikitu , neiya theduna mari " .
Now we shall move forward initializing Private Git Server for organiztion and testing . There are many sources are available for it like gogs , gitea and more ...
Gitea - https://gitea.io/en-us/ Gitea is a painless self-hosted Git service. It is similar to GitHub, Bitbucket, and Gitlab. Gitea is a fork of Gogs. See the Gitea Announcement blog post to read about the justification for a fork.
The goal of this project is to make the easiest, fastest, and most painless way of setting up a self-hosted Git service. With Go, this can be done with an independent binary distribution across ALL platforms that Go supports, including Linux, Mac OS X, Windows and ARM. Gogs : https://gogs.io/docs
Don't Forget even when you are in vain ,
External Sources :
github cheat sheet : https://services.github.com/on-demand/downloads/github-git-cheat-sheet.pdf
Youtube video : https://www.youtube.com/watch?v=SWYqp7iY_Tc
If You have anything to say nice comment down , else mail me at syedjafer1997@gmail.com .
When you complete the system , you will share the folder with your team leader. He will be collecting it from you and from all others for their respective tasks . So there are many copies of the files occur in our system . Which may cause a mess with project .
Also consider a situation where we find that version 1 of the project works fine . We try to improve it using some addition and deletion of code , which may cause the whole system may fail to work with alignments or some other stuff .
We try to reduce all of these problem using GIT . To know the about how git was formed see here .
Git is the open source distributed version control system that facilitates GitHub activities on your laptop or desktop.
Now we will see about working of git .
Installation :
GitHub for Windows :
https://windows.github.com
There is a availability of git bash in windows :-)
GitHub for Mac :
https://mac.github.com
GitHub for GNU/linux:
Debian-based linux systems
Open Terminal , Copy & paste the following into the terminal window and hit Enter .
You may be prompted to enter your password.sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git
Red Hat-based linux systems
Open Terminal , Copy & paste the following into the terminal window and hit Enter .
You may be prompted to enter your password.
sudo yum upgrade
sudo yum install git
" Create a account in github.com "
CONFIGURE TOOLING
Configure user information for all local repositories
git config --global user.name "[name]"
git config --global user.email "[email address]"
Workflow of GIT :
To initialize git inside folder : git init
To add all the files to git : git add *
To commit the changes : git commit -m "First commit "
here m stands for message .
By default we will be on branch - Master . We can also create branches for several versions of our projects .
To know the status of the git : git status . By using it , it will also provide the branch of the system . ( Either master or some other )
To Create Branches : git branch <branch name>
To know the log of git : git log
It will display all the commits that are been held in the past .
To move to other branches : git checkout <branch name>
Eg : git checkout master .
When you find that your code works in other branches and you want to merge it with master : git merge <this branch> <that branch> .
Sometimes when interns are very excited and do not know what they are doing may cause ,
Actual GIT MERGER scenario is been explained here :
Want To Host your website for free - Here is GIT for you .
Create a repository with <username>.github.io then push all the html files to the repo . Be sure that index.html is the main html file .
Then push all the files and see your website live with url http://<username>.github.io .
You can also specify the domain name for free (Only for students) until you complete your course (Not taking consideration of arrears :-) ) .
Link to avail free domain name : https://www.namecheap.com/support/knowledgebase/article.aspx/9645/2208/how-do-i-link-my-domain-to-github-pages
For adding more website for different repo then add your web related files under gh-pages .
This is all about basics of git . But still Some people likes to travel by wooden wheels even when ola is available . Athatvathu "kaila venaiya vachikitu , neiya theduna mari " .
Now we shall move forward initializing Private Git Server for organiztion and testing . There are many sources are available for it like gogs , gitea and more ...
Gitea - https://gitea.io/en-us/ Gitea is a painless self-hosted Git service. It is similar to GitHub, Bitbucket, and Gitlab. Gitea is a fork of Gogs. See the Gitea Announcement blog post to read about the justification for a fork.
The goal of this project is to make the easiest, fastest, and most painless way of setting up a self-hosted Git service. With Go, this can be done with an independent binary distribution across ALL platforms that Go supports, including Linux, Mac OS X, Windows and ARM. Gogs : https://gogs.io/docs
Don't Forget even when you are in vain ,
External Sources :
github cheat sheet : https://services.github.com/on-demand/downloads/github-git-cheat-sheet.pdf
Youtube video : https://www.youtube.com/watch?v=SWYqp7iY_Tc
If You have anything to say nice comment down , else mail me at syedjafer1997@gmail.com .
Comments
Post a Comment