Practicing coding on a daily basis is a very important and worthwhile practice. It helps a lot to develop the skills that a successful developer needs to possess. Indeed, it is the basic practice for a programmer and everybody knows that. And for this purpose, many people set goals to practice some amount of coding every day. However, the main problem with many people while practicing coding is that they can’t stay consistent and motivated maybe because of lack of energy, motivation, and sometimes due to feeling procrastinated.
What’ the solution for this?
So, here are some tips and tricks which will not only help you to stay motivated while practicing coding regularly but will also increase your productivity. And the well-known tool that can help you in this is GIT. Yes, Git can help you to increase your productivity as well as to stay motivated while doing any project or any coding practices. You also need a GitHub user account to make the most out of it. So let us know a bit about Git and Github.
Git is a Version Control System shortly VCS. It can manage the files and can keep track of them. Also, it can keep track of the changes made to the files and the history of the files that we are working with. There exists other VCS also but Git is the most popular and recommended one. It is well known for its inexpensiveness. On the other hand, Github is a cloud-based (or, web-based) service for Git. It is basically a community made for developers and here we can see other people’s works, contribute to their works, upload our works, and keep track of them using Git. It let us manage all the Git repositories that we create to keep track of our projects.
How to use Git and Github to stay motivated and productive?
First and foremost, you need to have one GitHub user account. To create an account, you can visit https://github.com/. If you are familiar with GitHub, you can see on your profile that the contribution graph is showing how much you have contributed on a daily basis with green colors. You can see the number of contributions and all the commit details for a particular day. Now, if you are a GitHub user you would have known that everybody wants to see their contribution graph full of green-colored sections.
Here comes the point – you have to set a target here. Take a goal of maybe 1 month or 2 months to contribute something to GitHub. You have to contribute something and as much as possible to your GitHub profile without skipping a single day so that no white blank section will be shown on your contribution graph for that 1 or 2 months timeline. Meanwhile, you have to keep in mind that you have to make the green color darker which indicates more number of contributions for a particular day. It indeed will help you to maintain consistency in your coding practice.
You can opt to follow the below-mentioned steps for setting up Git and Github & to keep track of your work progress:
- You have to install Git on your local machine. To do that visit the website https://git-scm.com/downloads to download and install Git on your local machine.
- Create a folder on your computer to practice coding or do the project works or create any random file or folder in that folder. The goal is that the folder will contain something and it should not be empty. You may write your first code there and just initialize your project structure.
- Open terminal (for Linux) or command prompt (for Windows), move to the working directory, and type the command git init.
- Now, to check the status of your work run the command git status.
- If there are any files or folders inside your base folder, type the command git add . to add every file and folder inside that base folder, to your git repository.
- Then type the command git commit -m “<any message you want to leave>”.
- Now as your git repository is initialized move ahead to https://github.com/, login to your profile, and create a new repository there.
- Give a name to the repository, don’t initialize any other files there (e.g: README.md, .gitignore), and click the ‘Create Repository’ button.
- Now, copy the link and come back to the terminal or command prompt, and run the command git remote add <github repository link that you have copied>.
- Now that your git repository is linked to the remote repository in GitHub, run the command git push -u origin master.
- Now, go to your GitHub profile, and at the bottom side of the page, check your contribution graph. You can see the commit will be shown there by the green-colored section.
- And that’s all, you have stepped into your target. Now keep contributing something every single day and check your GitHub contribution graph.
So, every time you start any project or any coding practice, take the advantage of Git and GitHub to maintain consistency. It will surely help you to stay motivated and will also increase your productivity.