This post will show you how to remove or unstage a file from the git commit. Note that it’s different than removing a file from git. Anyways, if you make a commit & even if you pushed the changes to the remote origin, this is still possible to remove a file from the commit and the remote git repository. Let’s see how you can do it. How to remove a file from git commit? I will walk you through the step-by-step process but I suggest you take a backup of your repository or download a zip. This is just for […]
Read More →“GitHub Pages” are static web websites that you can build directly from your repository. And any time you push a new change from your computer to the remote origin, your GitHub page/website will be updated automatically. It’s a one-time setting and your pages will be live until you remove the repository. Not last but least, it’s free and fast loading than many shared hosting servers. Let’s see how you can create one. Create your first GitHub page Prerequisite: You should have a static website on your local machine (computer) and a GitHub account. Create a GitHub repository if you don’t […]
Read More →In this post, I will show how you can merge a git branch to the master. Also, I will explain some other related topics that you should care about when merging, creating branches & switching. Let’s get started. How to merge a git branch to the master? There are two ways to merge a branch with the master branch. Such as using the command line & using GitHub. I will show you both ways to merge. If you work alone, the command line would be the better option. If you work on a team and other team members need to […]
Read More →In this post, I will show you how to pull a project from the GitHub repository to your local machine, how to run the git pull command, and when & why to use git pull. Please note that it’s different from the git clone that many beginners mess up with. Also, you will see common mistakes & errors while pushing to the remote origin and how to solve the issue with git pull (in the video). Let’s get started. How to use git pull to get the latest copy of your project? The command for pulling a repository is as […]
Read More →In this post, I will show how to use Git with Visual Studio Code (VSCode). This will be a beginner-friendly guide where I will start from the basics to finish. So be patient if you’re an expert. To use Git with Visual Studio Code editor/terminal, your first step should be to check whether Git is installed on your machine. If you’re a Windows user, you have to install Git on your computer. For Mac users, Git comes preinstalled and most Mac users don’t need to install it. Check if you already have git installed: In your command line, type the […]
Read More →In this post, I will give you a list of the most commonly used Git commands. Also, I will explain each of these commands so you will know when & why to use them. End of this post, I will give you a downloadable cheatsheet (PDF). But why you should read this post when there are other sources? Well, there are numerous Git commands, and you may don’t need many of them in your daily life. This post will show you the most commonly used Git commands that will serve your purpose even if you’re an expert. Let’s get started. […]
Read More →In this post, I will show how you can clone a Git repository using the command line (terminal). Also, I will give you a real repository to clone on your computer (for practice). You may have created brand-new repositories in the past. But why do you need to clone a Git repository and why this is helpful? To answer this question, I want to give you an example first. Let’s imagine, you & I are coworkers, I have been working on a website and I want you to help me. So the website already exists. In this case, you should […]
Read More →Git and GitHub are related but different tools, and you need to understand the distinctions between these two. If you want to use them together, see how to use Git & GitHub. Git is a distributed version control system. People use it to track changes, branching, merging, etc. It allows developers to collaborate on a project while keeping track of changes and maintaining version control. And a Git Hosting service makes this collaboration happen even if they live in different countries. For detailed information, see what is Git and why people use it in the first place. On the other […]
Read More →You may already know what is Git remote origin URL. But if you don’t know, Git remote URL is the link to your repository in GitHub, Bitbucket, or somewhere else. No matter which Git hosting service you use, the URL ends with “.git“ In this post, I will show how you can change your Git remote origin URL. This will be fairly quick & simple instruction. How to change Git remote origin URL? Before you attempt to change your Git remote origin URL, it’s a good practice to check the current remote URL first. To check your current Git remote […]
Read More →In this post, I will show you how to connect local Git to a remote repository. And this remote repository could be GitHub, Bitbucket, GitLab, or anything else. The process is the same. Connect your project to a remote Git repository Before you do anything, make sure Git is installed on your machine. Otherwise, see this post to install Git on your machine (both Windows & Mac) and for the first time Git configuration. To connect your local Git repo with a remote server, follow the steps below: Create a remote repository with the same name as the local project […]
Read More →