Member-only story
.gitkeep, GIT Jump, GIT Log, GIT Stash, diff-so-fancy
GIT Tips and Tricks to Improve your GIT Workflow
Tools and commands to improve your GIT Workflow
The Git system is a powerful tool for tracking source code changes. Commonly used by developers and programmers across the globe, gaining a familiarity with this technology is a great asset to have. This article covers a number of tips and tricks to help improve your Git literacy and workflow.
#1 Use .gitkeep to commit and push empty Git folders
Git doesn’t like to have empty folders. It doesn’t include them in the commits and it certainly doesn’t include empty folders when you push to GitHub or GitLab. But sometimes that causes a problem, which is where the .gitkeep file comes in.
Steps to use the .gitkeep file
To use the .gitkeep file to have Git push empty directories, follow these steps:
- Create a folder with the mkdir command
- Move into the empty folder with the cd command
- Create the .gitkeep file with the touch .gitkeep command
- Use git add . to update the Git index
- Perform a Git commit