Here I will not make a sociological analysis about “social media”; Do not worry. I will talk about Github, which is known as the social media of developers and developers. If you are developing software as a team / team, you have used an application that does “source control”, that is, “version control”. So far, you have tried environments such as git, subversion (SVN), maybe source safe or you have developed projects with some of them.
Well; Even if this is your first time hearing it, don’t bother. Nowadays, the most used version control environment / software development is Github. GitHub is a web-based storage service for software development projects that use Git as a version control system.
While GitHub offers paid membership options for private warehouses, it is free for open source projects. As of May 2011, GitHub has been the most popular storage service preferred by open source projects. Go; is a speed driven, distributed version control and source code management system used in software development processes. The first version was designed and developed by Linus Torvalds in 2005 for use in the development of the Linux kernel.
Go and Github are Not the Same!
Let’s open a little more: You are developing a single machine project. If you save every change you make on your main project, you are constantly working in the latest version. Okay, you are taking backups from time to time. All of this means that you don’t have to find a place on your computer when you need to do something retroactive in the project.
In Github and similar version control systems, you can store your works separately and on the internet. You can combine each new build with the previous one, or just see the differences. Github is free for open source projects. There is also a paid version for those who want.
Check out the packaging files for open source PisiLinux or BlackArch Linux distributions:
Since I am a Pisi Linux Package developer, I will tell you about the basic git commands and usage via PisiLinux Github:
- If you do not have an account, first open a membership from the Github web script.
- Create a “Github” directory to your home directory. I keep my files under this directory, so I avoid confusion.
- Open a command line while in the home directory and install git, openssh packages on your operating system. I show what is for PisiLinux:
sudo pisi it openssh sudo pisi it git
Type in the command line and press enter:
This command has generated us a key for Github.
Open the file named id_rsa.pub with your text editor and copy its contents. Click on the profile picture in your Github account, point to “Settings”. Click “SSH and GPG Keys” on the menu to the left of the bet. Paste and save the key that you copied from the id_rsa.pub file to the form in the opened bet by clicking the “New SSH Key” button in the top right of the opened bet.
- The first thing we will learn is to copy / import a project / repository / repo (or actually repository) in github to our Github bet. We call this process fork / fork. Unfortunately, I could not find a suitable Turkish response. We press the “Fork” button on the top right of the repo you want to fork. Once the bet is reloaded, you will see the same repo in your account.
- While using Github, we will copy the repo to our computer now. We call this process “take it to the local”. Better than “Download ZIP” from your browser! To the left of that download zip button there is a ssh link in a form, let’s copy it with Ctrl-C and open a terminal / terminal while in our Github directory, type it in the command line:
Here, your username should be written where “blue-devil” is written. Because you can download the repo you have forked on your computer, make changes and upload it to the internet again. But if you download someone else’s, what you do will only remain on your computer. As soon as you press Entera, it will begin to download / clone that repo to the directory you command on your computer.
git config --global user.name "user_name" git config --global user.email "[email protected]"
Make the adjustment.
- I speak for PisiLinux as an example / core / main / contrib or enter the directories you have cloned and cloned with the command “cd” and write them on the command line:
The “upstream” here is a branch (branch) created / used by those making the repo, for example, the branch (branch) we use for our own repo is “origin”.
- With Github, let’s shoot innovations and changes. Enter one of the / core / main or / contrib repo with cd, and write it on the command line:
git pull upstream master
This command compares the directory in your local with the remote directory and see. It is written to your local (hard disk).v
- And finally, how did you do it in the files you took to the local. To send them to remote github. I have a directory named newDirectory and I have files in it. I want to send this. The order you should follow is this:
git add newDirectory/* git commit -m "newDirectory: short information about my change" git push -u origin master
The origin here is the branch of my hendi github repom. It could have been a different name. But this will be the first time you use it.
To read to read my other blog posts: “https://www.flutteranywhere.com“