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!) #6

Open
webknjaz opened this issue Apr 24, 2023 · 0 comments
Open

Create an empty commit on main (and push nothing else there!) #6

webknjaz opened this issue Apr 24, 2023 · 0 comments
Assignees

Comments

@webknjaz
Copy link
Member

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 and/or using StackOverflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants