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 the hello-world repository git init -q cat > index.html << 'EOF'
Hello World!
Hello world!
This is the first file in my new Git Repo.
A new line in our file!
EOF echo "# hello-world" > README.md echo "body {background-color: lightblue;}" > bluestyle.css git add --all git commit -q -m "First release of Hello World!" # On the new branch, add an image (an empty file stands in for it) and a line in index.html git checkout -q -b hello-world-images touch img_hello_world.jpg sed -i '/
/a
' index.html git add --all git commit -q -m "Added image to Hello World" # Go back to main git checkout -q main # Make an emergency fix on a new branch git checkout -q -b emergency-fix sed -i 's/A new line in our file!/This line is here to show how merging works./' index.html git commit -q -am "updated index.html with emergency fix" # Go back to main git checkout -q main git merge emergency-fix
Updating f938b79..e7e2d06
Fast-forward
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)