In this post, you’ll see how to create a two-column layout in HTML CSS. Also, you’ll learn how to make this layout mobile responsive. That means the layout will automatically break into one column on small screens. I will give you all the source code for this column layout & the link to my GitHub repository. Before you start, let’s see the live template that we’re going to build in this post. In this post, I will show you three different ways to create a two-column layout. Use any of the approaches that you like the most. Let’s get started. […]
Read More →In this post, you’ll see how to create a mobile responsive & equal-width 3-column layout in HTML & CSS. Also, you’ll learn how to do it in three different ways such as CSS flexbox, grid & float. End of this post, I will give my opinion about the best method that you should use. Not to mention, I will also give you the source code of the column layouts. End of the post, you’ll also find my GitHub repository URL to clone the entire template. See the live preview of what we are going to build in this post. Some […]
Read More →In this post, you’ll know how to perform a successful git push after rebase. Pushing changes to the remote origin is nothing new. But there are some situations where the push may be rejected. Or it can override someone else’s progress. After you rebase, the commit history changes. So you need to push with the “–force” flag. If you encounter a “git push rejected” error after rebasing a feature branch, here are some steps you can follow to fix it. Double-check your changes After rebasing a feature branch, ensure you have resolved conflicts and staged the changes using the git […]
Read More →Git rebase allows you to integrate changes from one branch into another. You can apply commits from the source branch to the target branch. But when actually you should use git rebase? Use git rebase when you want to maintain a clean commit history, incorporate changes from a parent branch, resolve conflicts in a controlled manner, and collaborate on shared branches in a team setting. However, don’t make a habit of using git rebase every time especially when you have other sophisticated ways to solve an issue. It becomes very handy when you need to change a certain commit message. […]
Read More →To add all files & folders on git, use the following command: git add -A This command will stage all the changes for the next commit. There are some other similar commands on git that I will discuss later in this post. Git is one of the most popular version control systems around the globe. It keeps track of the changes to your project. You can learn more about Git, why it is used, why people like it so much, etc in this post. Troubleshoot — Commands before git add -A (all) If you see a fatal error such as […]
Read More →In this post, you’ll see how to remove file from git in different contexts. If you committed a file by mistake and pushed it to the remote origin, there are commands to delete the file. Also, if you want to keep a file locally on your machine but delete it only from the remote origin, there is a command for it as well. Last but not least, you also have a way to ignore the deleted file from the future commit & push. Let’s explore them one by one. How to delete files from Git To delete a file locally, […]
Read More →When you work on different git branches, you may need to switch between branches in your command line (terminal). In Git’s terminology, switching branches refers to the “git checkout” command. Anyways, to switch or change a git branch type the following command and hit enter: git checkout branch_name_here Replace the branch_name_here with the actual branch name you want to switch to. The above command will allow you to jump/navigate from one branch to another. How to switch from the master branch to another branch? Let’s say you want to switch from the master branch to another branch named “about-page.” To […]
Read More →There are a couple of options for undoing the git commit. Also, there are two scenarios where you may need to undo the last git commit. Such as undo commit that you did not push yet (locally) and the last commit that you already pushed to the remote origin. I will show you all these options. Undoing git commit that has not been pushed yet Type the following command and hit enter to undo the last commit: git reset HEAD~1 The above command will reset the branch to the previous commit. It will also keep the changes you made last […]
Read More →If you accidentally ran the git add -a and if you want to undo this command, follow the step below: First of all, check the status by git status This will show you the list of the files that are staged. It’s not mandatory but good to check. So you can compare the end of undoing the git add command. Second, type the following command and hit enter: git reset . This will unstage all files or remove all the files from the staging area. That’s it! See how to remove files from Git. Now if you run the git […]
Read More →This post will show you how to change the git commit message. And this commit could be the last one or a specific number of commit such as the 5th or 6th or 9th commit message. You’ll find all sorts of documents to change the commit message. Such as every step with exact commands, screenshots, and video instructions. How to change the last git commit message? If you wrote a wrong message in the last commit, you can change it very easily as you normally run other git commands. To change the last commit message, type the following command & […]
Read More →