Run ❯
Get your
own
website
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Change Language
Go to Spaces
Ctrl+Alt+P
# Set up a repository where the last commit has a file it should not have git init -q echo "# hello-world" > README.md git add README.md git commit -q -m "First commit" echo "# Hello World" > README.md echo "A line about Git" >> README.md echo "A line about GitHub" >> README.md echo "Not for the repository" > unwanted.txt git add README.md unwanted.txt git commit -q -m "Added lines to README.md" git reset HEAD^ -- unwanted.txt # --no-edit keeps the commit message. Without it, git commit --amend # opens a text editor for the message, which is not available here git commit --amend --no-edit # unwanted.txt is still in the folder, but no longer in the commit git status --short
[main 1e06acc] Added lines to README.md
Date: Wed Jan 15 10:00:00 2025 +0000
1 file changed, 3 insertions(+), 1 deletion(-)
?? unwanted.txt