How To Get Qualified Leads Through These 6 Key Areas

Which is a better scenario: having many cold leads and spending time trying to get them to get your services or having qualified leads and getting them to sign up quickly to your services? The best…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Understanding Git and GitHub

Sharing your code with your team or friends

Git is by far the most popular version control system out there. It will help you control and monitor changes that you make to the project you’re working on.

For example: You have a project that works fine. You save those changes and then you continue working on it, f.e. adding new features. If you now run into problems and screw up your code, you can easily go back to an older version of your project using Git.

GitHub is a software development platform that uses Git. It enables programmers to collaborate and share code. From what I know GitHub is used in almost every software company on this planet, and there is probably no way around it if you want to get into programming.

Let’s look at one scenario and go through the steps of using Git and Github:

Let’s say you and your friend Adam had a brilliant conversation in your local pup after one too many Whiskeys, and you decided you want to create the next Instagram, only specialized for cat photos. The next morning you start working on the basic structure of the project and now you want to send it over to Adam, so that he can work on it too and implement some of his ideas. How can you and your friend share code, each make changes to it and not end up in a total disaster?

The first step is to check if by any magical luck you already have Git installed. Run the following command in the command line (Terminal):

If it gives you a Git version then the gods have been good to you and you can skip the next step. If it says that the command wasn’t found and you’re using Debian/Ubuntu, run the following:

If your machine has an apple on it and you have Homebrew installed, which you should, run the following:

Now run ‘git version’ again, and it should tell you the version you have installed.

Go to github.com and create an account. Now, click on new repository and give it a name. You can leave the checkboxes under ‘Initialize this repository with:’ empty for now and click ‘create repository’. Congrats, you’ve just created your first repository on GitHub and are now one step closer to making millions.

Now you can download the repository and/or send the url for your repository to your friend.

All he or you has to do now is click on code, copy the url under “https”, go into the Terminal and use the following command:

Et voilà, you two can now work on the same project. But how exactly can two or even more people work on the same project at the same time, you ask?

One of the main features of GitHub are branches. If you want to add a feature to the project, you can create a new branch, implement the feature, ask your teammates to review your feature, and ultimately integrate it into the project.

This way every feature that will be added to the project can have a branch and can be worked on separately.

To create a new branch, navigate to your projects directory in your terminal and enter:

You’ve now created your first branch and git automatically takes you into it. To check in which branch you are currently located, enter:

It should tell you your branch name at the top, and you can make some changes to the code now.

Once you’re done with implementing changes, you can commit them. That basically means that you prepare to upload them to GitHub.

Use the ‘git status’ command again to check which files you have added or changed. They will appear in red font and you can stage them for a commit by using:

When you’ve added all your files, you can now push them GitHub by using:

If this is your first commit on this branch, it will tell you that your branch has no upstream branch. Simple copy the command your terminal gives you that starts with “git push …”

If you’ve done everything correctly, your branch is now on Github and you can create a Pull Request.

The name “Pull Request” is a little misleading, but it is basically a request to merge your feature into the project, also known as your main branch.

Too create a pull request, go to the project directory in GitHub, click on “Pull Request” and then “New Pull Request”.

You can now choose your branch that you want to merge into your main branch. It should look like this:

Click on create Pull Request. Now you can assign people from your team to review your code. They can then add comments to it, requesting to change a certain line, or approve your request.

After the review process, the reviewers can approve your Pull Request and the branch will be merged into the main branch.

Git is probably the best way to share your code and learning it will make you a better candidate for future job applications. It might be a little confusing at first but after committing and creating Pull Request a few times, you will become more confident with it, and never want to miss it again.

Add a comment

Related posts:

The Experience of Divorce

I threw in the towel. I did. I gave up on my divorce negotiations because the desire to be free and away from the stress and drama of divorce was too compelling.