1573180362
Git is a free, open-source version control software. It was created by Linus Torvalds in 2005. This tool is a version control system that was initially developed to work with several developers on the Linux kernel.
This basically means that Git is a content tracker. So Git can be used to store content — and it is mostly used to store code because of the other features it provides.
Real life projects generally have multiple developers working in parallel. So they need a version control system like Git to make sure that there are no code conflicts between them.
Also, the requirements in such projects change often. So a version control system allows developers to revert and go back to an older version of their code.
The branch system in Git allows developers to work individually on a task (For example: One branch -> One task OR One branch -> One developer). Basically think of Git as a small software application that controls your code base, if you’re a developer.
If we want to start using Git, we need to know where to host our repositories.
A repository (or “Repo” for short) is a project that contains multiple files. In our case a repository will contain code-based files.
There are two ways you can host your repositories. One is online (on the cloud) and the second is offline (self-installed on your server).
There are three popular Git hosting services: GitHub (owned by Microsoft), GitLab (owned by GitLab) and BitBucket. We’ll use GitHub as our hosting service.
Nearly every open-source project uses GitHub to manage their projects. Using GitHub is free if your project is open source, and it includes a wiki and issue tracker that makes it easy to include more in-depth documentation and get feedback about your project.
If you want to contribute, you just fork (get a copy of) a project, make your changes, and then send the project a pull request using GitHub’s web interface. This pull request is your way of telling the project you’re ready for them to review your changes.
By using GitHub, you make it easier to get excellent documentation. Their help section and guides have articles for nearly any topic related to Git that you can think of.
GitHub can integrate with common platforms such as Amazon and Google Cloud, with services such as Code Climate to track your feedback, and can highlight syntax in over 200 different programming languages.
When multiple people collaborate on a project, it’s hard to keep track of revisions — who changed what, when, and where those files are stored.
GitHub takes care of this problem by keeping track of all the changes that have been pushed to the repository.
Much like using Microsoft Word or Google Drive, you can have a version history of your code so that previous versions are not lost with every iteration. It’s easy to come back to the previous version and contribute your work.
Are you a developer who wishes to attract recruiters? GitHub is the best tool you can rely on for this.
Today, when searching for new recruits for their projects, most companies look at GitHub profiles. If your profile is available, you will have a higher chance of being recruited even if you are not from a great university or college.
To create your account, you need to go to GitHub’s website and fill out the registration form.
Now we need to install Git’s tools on our computer. We’ll use CLI to communicate with GitHub.
For Ubuntu:
sudo apt update
2. Next, install Git and GitHub with apt-get
sudo apt-get install git
3. Finally, verify that Git is installed correctly
git --version
4. Run the following commands with your information to set a default username and email when you’re going to save your work.
git config --global user.name "MV Thanoshan"
git config --global user.email "[email protected]"
We’ll work with GitHub projects in two ways.
Type 1 involves creating a totally fresh repository on GitHub, cloning it to our computer, working on our project, and pushing it back.
Create a new repository by clicking the “new repository” button on the GitHub web page.
Pick a name for your first repository, add a small description, check the ‘Initialize this repository with a README’ box, and click on the “Create repository” button.
Well done! Your first GitHub repository is created.
Your first mission is to get a copy of the repository on your computer. To do that, you need to “clone” the repository on your computer.
To clone a repository means that you’re taking a repository that’s on the server and cloning it to your computer – just like downloading it. On the repository page, you need to get the “HTTPS” address.
Once you have the address of the repository, you need to use your terminal. Use the following command on your terminal. When you’re ready you can enter this:
git clone [HTTPS ADDRESS]
This command will make a local copy of the repository hosted at the given address.
Now, your repository is on your computer. You need to move in it with the following command.
cd [NAME OF REPOSITORY]
As you can see in the above picture, my repository name is “My-GitHub-Project” and this command made me go to that specific directory.
**NOTE:**When you clone, Git will create a repository on your computer. If you want, you can access your project with the computer user interface instead using the above ‘cd’ command on the terminal.
Now, in that folder we can create files, work on them, and save them locally. To save them in a remote place — like GitHub – we have do a process called a “commit”. To do this, get back to your terminal. If you closed it, like I previously stated, use the ‘cd’ command.
cd [NAME OF REPOSITORY]
Now, in the terminal, you’re in your repository directory. There are 4 steps in a commit: ‘status’ , ‘add’ , ‘commit’ and ‘push’. All the following steps must be performed within your project. Let’s go through them one by one.
git status
2. “add”: With the help of the change list, you can add all files you want to upload with the following command,
git add [FILENAME] [FILENAME] [...]
In our case, we’ll add a simple HTML file.
git add sample.html
3. “commit”: Now that we have added the files of our choice, we need to write a message to explain what we have done. This message may be useful later if we want to check the change history. Here is an example of what we can put in our case.
git commit -m "Added sample HTML file that contain basic syntax"
4. “push”: Now we can put our work on GitHub. To do that we have to ‘push’ our files to Remote. Remote is a duplicate instance of our repository that lives somewhere else on a remote server. To do this, we must know the remote’s name (Mostly remote is named origin). To figure out that name, type the following command.
git remote
As you can see in the above image, it says that our remote’s name is origin. Now we can safely ‘push’ our work by the following command.
git push origin master
Now, if we go to our repository on the GitHub web page, we can see the sample.html file that we’ve pushed to remote — GitHub!
NOTE: Sometimes when you’re using Git commands in the terminal, it can lead you to the VIM text editor (a CLI based text-editor). So to get rid of it, you have to type
:q
and ENTER.
Pulling is the act of receiving from GitHub.
Pushing is the act of sending to GitHub.
Type 2 lets you make a fresh repository from an existing folder on our computer and send that to GitHub. In a lot of cases you might have actually already made something on your computer that you want to suddenly turn into a repository on GitHub.
I will explain this to you with a Survey form web project that I made earlier that wasn’t added to GitHub.
As I already mentioned, when executing any Git commands, we have to make sure that we are in the correct directory in the terminal.
By default, any directory on our computer is not a Git repository – but we can turn it into a Git repository by executing the following command in the terminal.
git init
After converting our directory to a Git repository, the first thing we need to do is to check the files we have by using the following command.
git status
So there are two files in that directory that we need to “add” to our Repo.
git add [FILENAME] [FILENAME] [...]
NOTE: To “add” all of the files in our Repository we can use the following command:
git add .
After the staging area (the add process) is complete, we can check whether the files are successfully added or not by executing the git status
If those particular files are in green like the below picture, you’ve done your work!
Then we have to “commit” with a description in it.
git commit -m "Adding web Survey form"
If my repository started on GitHub and I brought it down to my computer, a remote is already going to be attached to it (Type 1). But if I’m starting my repository on my computer, it doesn’t have a remote associated with it, so I need to add that remote (Type 2).
So to add that remote, we have to go to GitHub first. Create a new repository and name it whatever you want to store it in GitHub. Then click the “Create repository” button.
NOTE: In Type 2, Please don’t initialize the repository with a README file when creating a new repository on the GitHub web page.
After clicking the “Create repository” button you’ll find the below image as a web page.
Copy the HTTPS address. Now we’ll create the remote for our repository.
git remote add origin [HTTPS ADDRESS]
After executing this command, we can check whether we have successfully added the remote or not by the following command
git remote
And if it outputs “origin” you’ve added the remote to your project.
NOTE: Just remember we can state any name for the remote by changing the name “origin”. For example:
git remote add [REMOTE NAME] [HTTPS ADDRESS]
Now, we can push our project to GitHub without any problems!
git push origin master
After completing these steps one by one, if you go to GitHub you can find your repository with the files!
Thank you everyone for reading. I just explained the basics of Git and GitHub. I strongly encourage you all to read more related articles on Git and GitHub. I hope this article helped you.
Happy Coding!
#git #github
1573180362
Git is a free, open-source version control software. It was created by Linus Torvalds in 2005. This tool is a version control system that was initially developed to work with several developers on the Linux kernel.
This basically means that Git is a content tracker. So Git can be used to store content — and it is mostly used to store code because of the other features it provides.
Real life projects generally have multiple developers working in parallel. So they need a version control system like Git to make sure that there are no code conflicts between them.
Also, the requirements in such projects change often. So a version control system allows developers to revert and go back to an older version of their code.
The branch system in Git allows developers to work individually on a task (For example: One branch -> One task OR One branch -> One developer). Basically think of Git as a small software application that controls your code base, if you’re a developer.
If we want to start using Git, we need to know where to host our repositories.
A repository (or “Repo” for short) is a project that contains multiple files. In our case a repository will contain code-based files.
There are two ways you can host your repositories. One is online (on the cloud) and the second is offline (self-installed on your server).
There are three popular Git hosting services: GitHub (owned by Microsoft), GitLab (owned by GitLab) and BitBucket. We’ll use GitHub as our hosting service.
Nearly every open-source project uses GitHub to manage their projects. Using GitHub is free if your project is open source, and it includes a wiki and issue tracker that makes it easy to include more in-depth documentation and get feedback about your project.
If you want to contribute, you just fork (get a copy of) a project, make your changes, and then send the project a pull request using GitHub’s web interface. This pull request is your way of telling the project you’re ready for them to review your changes.
By using GitHub, you make it easier to get excellent documentation. Their help section and guides have articles for nearly any topic related to Git that you can think of.
GitHub can integrate with common platforms such as Amazon and Google Cloud, with services such as Code Climate to track your feedback, and can highlight syntax in over 200 different programming languages.
When multiple people collaborate on a project, it’s hard to keep track of revisions — who changed what, when, and where those files are stored.
GitHub takes care of this problem by keeping track of all the changes that have been pushed to the repository.
Much like using Microsoft Word or Google Drive, you can have a version history of your code so that previous versions are not lost with every iteration. It’s easy to come back to the previous version and contribute your work.
Are you a developer who wishes to attract recruiters? GitHub is the best tool you can rely on for this.
Today, when searching for new recruits for their projects, most companies look at GitHub profiles. If your profile is available, you will have a higher chance of being recruited even if you are not from a great university or college.
To create your account, you need to go to GitHub’s website and fill out the registration form.
Now we need to install Git’s tools on our computer. We’ll use CLI to communicate with GitHub.
For Ubuntu:
sudo apt update
2. Next, install Git and GitHub with apt-get
sudo apt-get install git
3. Finally, verify that Git is installed correctly
git --version
4. Run the following commands with your information to set a default username and email when you’re going to save your work.
git config --global user.name "MV Thanoshan"
git config --global user.email "[email protected]"
We’ll work with GitHub projects in two ways.
Type 1 involves creating a totally fresh repository on GitHub, cloning it to our computer, working on our project, and pushing it back.
Create a new repository by clicking the “new repository” button on the GitHub web page.
Pick a name for your first repository, add a small description, check the ‘Initialize this repository with a README’ box, and click on the “Create repository” button.
Well done! Your first GitHub repository is created.
Your first mission is to get a copy of the repository on your computer. To do that, you need to “clone” the repository on your computer.
To clone a repository means that you’re taking a repository that’s on the server and cloning it to your computer – just like downloading it. On the repository page, you need to get the “HTTPS” address.
Once you have the address of the repository, you need to use your terminal. Use the following command on your terminal. When you’re ready you can enter this:
git clone [HTTPS ADDRESS]
This command will make a local copy of the repository hosted at the given address.
Now, your repository is on your computer. You need to move in it with the following command.
cd [NAME OF REPOSITORY]
As you can see in the above picture, my repository name is “My-GitHub-Project” and this command made me go to that specific directory.
**NOTE:**When you clone, Git will create a repository on your computer. If you want, you can access your project with the computer user interface instead using the above ‘cd’ command on the terminal.
Now, in that folder we can create files, work on them, and save them locally. To save them in a remote place — like GitHub – we have do a process called a “commit”. To do this, get back to your terminal. If you closed it, like I previously stated, use the ‘cd’ command.
cd [NAME OF REPOSITORY]
Now, in the terminal, you’re in your repository directory. There are 4 steps in a commit: ‘status’ , ‘add’ , ‘commit’ and ‘push’. All the following steps must be performed within your project. Let’s go through them one by one.
git status
2. “add”: With the help of the change list, you can add all files you want to upload with the following command,
git add [FILENAME] [FILENAME] [...]
In our case, we’ll add a simple HTML file.
git add sample.html
3. “commit”: Now that we have added the files of our choice, we need to write a message to explain what we have done. This message may be useful later if we want to check the change history. Here is an example of what we can put in our case.
git commit -m "Added sample HTML file that contain basic syntax"
4. “push”: Now we can put our work on GitHub. To do that we have to ‘push’ our files to Remote. Remote is a duplicate instance of our repository that lives somewhere else on a remote server. To do this, we must know the remote’s name (Mostly remote is named origin). To figure out that name, type the following command.
git remote
As you can see in the above image, it says that our remote’s name is origin. Now we can safely ‘push’ our work by the following command.
git push origin master
Now, if we go to our repository on the GitHub web page, we can see the sample.html file that we’ve pushed to remote — GitHub!
NOTE: Sometimes when you’re using Git commands in the terminal, it can lead you to the VIM text editor (a CLI based text-editor). So to get rid of it, you have to type
:q
and ENTER.
Pulling is the act of receiving from GitHub.
Pushing is the act of sending to GitHub.
Type 2 lets you make a fresh repository from an existing folder on our computer and send that to GitHub. In a lot of cases you might have actually already made something on your computer that you want to suddenly turn into a repository on GitHub.
I will explain this to you with a Survey form web project that I made earlier that wasn’t added to GitHub.
As I already mentioned, when executing any Git commands, we have to make sure that we are in the correct directory in the terminal.
By default, any directory on our computer is not a Git repository – but we can turn it into a Git repository by executing the following command in the terminal.
git init
After converting our directory to a Git repository, the first thing we need to do is to check the files we have by using the following command.
git status
So there are two files in that directory that we need to “add” to our Repo.
git add [FILENAME] [FILENAME] [...]
NOTE: To “add” all of the files in our Repository we can use the following command:
git add .
After the staging area (the add process) is complete, we can check whether the files are successfully added or not by executing the git status
If those particular files are in green like the below picture, you’ve done your work!
Then we have to “commit” with a description in it.
git commit -m "Adding web Survey form"
If my repository started on GitHub and I brought it down to my computer, a remote is already going to be attached to it (Type 1). But if I’m starting my repository on my computer, it doesn’t have a remote associated with it, so I need to add that remote (Type 2).
So to add that remote, we have to go to GitHub first. Create a new repository and name it whatever you want to store it in GitHub. Then click the “Create repository” button.
NOTE: In Type 2, Please don’t initialize the repository with a README file when creating a new repository on the GitHub web page.
After clicking the “Create repository” button you’ll find the below image as a web page.
Copy the HTTPS address. Now we’ll create the remote for our repository.
git remote add origin [HTTPS ADDRESS]
After executing this command, we can check whether we have successfully added the remote or not by the following command
git remote
And if it outputs “origin” you’ve added the remote to your project.
NOTE: Just remember we can state any name for the remote by changing the name “origin”. For example:
git remote add [REMOTE NAME] [HTTPS ADDRESS]
Now, we can push our project to GitHub without any problems!
git push origin master
After completing these steps one by one, if you go to GitHub you can find your repository with the files!
Thank you everyone for reading. I just explained the basics of Git and GitHub. I strongly encourage you all to read more related articles on Git and GitHub. I hope this article helped you.
Happy Coding!
#git #github
1624226400
Bitcoin Cash was created as a result of a hard fork in the Bitcoin network. The Bitcoin Cash network supports a larger block size than Bitcoin (currently 32mb as opposed to Bitcoin’s 1mb).
Later on, Bitcoin Cash forked into Bitcoin SV due to differences in how to carry on its developments.
That’s Bitcoin Cash in a nutshell. If you want a more detailed review watch the complete video. Here’s what I’ll cover:
0:50 - Bitcoin forks
2:06 - Bitcoin’s block size debate
3:35 - Big blocks camp
4:26 - Small blocks camp
5:16 - Small blocks vs. big blocks arguments
7:05 - How decisions are made in the Bitcoin network
10:14 - Block size debate resolution
11:06 - Bitcoin cash intro
11:28 - BTC vs. BCH
12:13 - Bitcoin Cash (ABC) vs. Bitcoin SV
13:09 - Conclusion
📺 The video in this post was made by 99Bitcoins
The origin of the article: https://www.youtube.com/watch?v=ONhbb4YVRLM
🔺 DISCLAIMER: The article is for information sharing. The content of this video is solely the opinions of the speaker who is not a licensed financial advisor or registered investment advisor. Not investment advice or legal advice.
Cryptocurrency trading is VERY risky. Make sure you understand these risks and that you are responsible for what you do with your money
🔥 If you’re a beginner. I believe the article below will be useful to you ☞ What You Should Know Before Investing in Cryptocurrency - For Beginner
⭐ ⭐ ⭐The project is of interest to the community. Join to Get free ‘GEEK coin’ (GEEKCASH coin)!
☞ **-----CLICK HERE-----**⭐ ⭐ ⭐
Thanks for visiting and watching! Please don’t forget to leave a like, comment and share!
#bitcoin #blockchain #bitcoin cash #what is bitcoin cash? - a beginner’s guide #what is bitcoin cash #a beginner’s guide
1597916460
There is no doubt that Git plays a significant role in software development. It allows developers to work on the same code base at the same time. Still, developers struggle for code quality. Why? They fail to follow git best practices. In this post, I will explain seven core best practices of Git and a Bonus Section.
Committing something to Git means that you have changed your code and want to save these changes as a new trusted version.
Version control systems will not limit you in how you commit your code.
But is it good? Not quite.
Because you are compromising code quality, and it will take more time to review code. So overall, team productivity will be reduced. The best practice is to make an atomic commit.
When you do an atomic commit, you’re committing only one change. It might be across multiple files, but it’s one single change.
Many developers make some changes, then commit, then push. And I have seen many repositories with unwanted files like dll, pdf, etc.
You can ask two questions to yourself, before check-in your code into the repository
You can simply use the .gitignore file to avoid unwanted files in the repository. If you are working on more then one repo, it’s easy to use a global .gitignore file (without adding or pushing). And .gitignore file adds clarity and helps you to keep your code clean. What you can commit, and it will automatically ignore the unwanted files like autogenerated files like .dll and .class, etc.
#git basics #git command #git ignore #git best practices #git tutorial for beginners #git tutorials
1626359400
In this crash course, you will learn all about Git and GitHub from the beginning and see why they are the most popular version control system. You will also learn about various git commands and how to use them. This Git and Github complete tutorial covers everything for beginners to intermediate developers who want to get started with git for their day-to-day projects.
Hope you enjoy the video!
🔗 Links:
Git Commands - https://gist.github.com/yodkwtf/00ead54b4121cb1936cd210390e221cb
Download Git - https://git-scm.com/downloads
Join GitHub - https://github.com/login
🧠 Topics:
🤝 Socials:
Instagram - https://www.instagram.com/yodkwtf
Twitter - https://twitter.com/yodkwtf
GitHub - https://github.com/yodkwtf
⌚ Timestamps:
00:00 - Intro
01:15 - Git vs GitHub
03:23 - Download Git
06:48 - VS Code Terminal
08:24 - Basic Git Commands - Theory
11:38 - Basic Git Commands - Practical
12:07 - git init command
12:50 - git add command
13:57 - git commit command
15:02 - Creating a GitHub repository
16:40 - Pushing a repo to GitHub
19:33 - How to push new changes to GitHub
24:26 - Downloading remote repo to local system
25:00 - git clone vs download zip
31:00 - Undoing git add command
33:48 - Undoing git commit commands
39:18 - Benefits of using Git and GitHub
42:10 - Tips for using Git and GitHub
53:33 - Conclusion
54:57 - Outro
Like, share, and subscribe if you like the content.
Thanks for watching :)
#git #github #programming
#yodkwtf academy #github #git #beginners
1620027000
IT is in no way different from any other sector when it comes to naming. You would see some systems being named based on their origin while others are named keeping in mind their features or functionality. Then there are some whose names have nothing in common with their origin, features, or anything else related to them.
It is these inconsistencies in naming conventions that make people confused about what a system is all about, what it does, and what benefits it offers. For instance, there are a lot of people out there who still get puzzled when asked about Git and GitHub and whether or not there is a difference between the two.
The similarity in their names has nothing to do with what they really are. They are two altogether different things. But at the same time, you can say that they still have a thing or two in common. Before we talk about Git and GitHub, let us first shed some light on version control systems (VCSs) and why are they so important.
In simple terms, version control is nothing but a system that keeps track of the changes made to source code or files. With a version control system, you can look back at the changes made to a particular file, either by you or another person, by accessing the version control database. This system gives you the ability to compare different versions of a file, thus allowing you to stay informed about the changes that have happened over a period of time.
The version control system can be referred to as a database that stores snapshots of different files in a project. These snapshots are taken every time a file is modified. It maintains all the records of the different versions of a file. In addition to comparing different versions of a file, VCSs also allows you to switch between them. VCSs can either be distributed or centralized. Let us see how these two types differ.
Centralized version control systems use a single, centralized server to store all the different versions of a file. Users can access these files by gaining access to this centralized server. Now, there is a disadvantage associated with this type of VCS. If the central server fails to function due to any reason, the entire history stored on its will be gone and no one will be able to recover any version/versions of the lost files.
Distributed version control systems have an edge over their centralized counterparts. These VCSs store file versions in two locations – the centralized server and your local machine. So, the disadvantage that we discussed centralized systems doesn’t exist in distributed systems.
Even if the server undergoes failure, you can retrieve all the different versions of your files from your local machine. Suppose you have a file, which is called VersionControl1. Now you made several changes to this file and saved the changes on each occasion. All the changes that you made to this file will be stored in the VCS, which will have all those versions of this file when you made changes to it.
#full stack development #git vs github #git #github