Pushing empty commits to remote

I have pushed one commit to remote but now I realized that the commit message is not correct. I would like to change the commit message but AFAIK it is not possible. So i decided to create empty commit with correct message: git commit –allow-empty Are there any disadvantages/consequences of pushing empty commits? Is there … Read more

Remove sensitive files and their commits from Git history

I would like to put a Git project on GitHub but it contains certain files with sensitive data (usernames and passwords, like /config/deploy.rb for capistrano). I know I can add these filenames to .gitignore, but this would not remove their history within Git. I also don’t want to start over again by deleting the /.git … Read more

Fix GitLab error: “you are not allowed to push code to protected branches on this project”?

I have a problem when I push my codes to git while I have developer access in my project, but everything is okay when I have master access. Where is the problem come from? And how to fix it? Error message: error: You are not allowed to push code to protected branches on this project. … Read more

Should I use past or present tense in git commit messages? [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 8 years ago. Improve this question I read once that git commit messages should be in the imperative present tense, e.g. “Add … Read more