Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an _empty_ commit on main (and push nothing else there!) #5

Open
webknjaz opened this issue Jul 1, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@webknjaz
Copy link
Member

webknjaz commented Jul 1, 2023

The following snippet should help you, given that you're starting with a fresh repository that does not have any commits yet.

git commit --allow-empty -m 'Initial commit'
git push origin main

Upon the completion of the task, here are the expectations:

  1. Only 1 (one) single commit in the main branch.
  2. The commit is supposed not to add (or remove for that matter) any files at all.
  3. There should be 0 (zero) files appearing in the repository at this point.

P.S. It's best to do this task having read the first 3 chapters of the ProGit 2 book from #4.
P.P.S. Fixing an incorrectly created commit would require amending it, or making an interactive rebase. This may imply going through more materials from #4, googling, using StackOverflow and/or asking ChatGPT.

@webknjaz webknjaz added the enhancement New feature or request label Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant