Skip to content

Latest commit

 

History

History
33 lines (28 loc) · 1.57 KB

macosx-vscode-ruby-3-git-commit.md

File metadata and controls

33 lines (28 loc) · 1.57 KB
title resources video
Committing the project to git
type command description
shell
git init .
Initialize a git repository in the current working directory
type command description
shell
git status
Show changes that can be committed to git
type command description
shell
git add .
Add all files in the current folder to the commit stage
type command description
shell
git commit -m "MESSAGE"
Commit all staged files to git with the commit message MESSAGE
poster src description
/getting-started/guides/macosx-vscode-ruby-3-git-commit.mp4.thumb.jpg
/getting-started/guides/macosx-vscode-ruby-3-git-commit.mp4
A screencast of committing the project to git (0.4MB)

Now that we have the project in a good shape, it's time to add it to git. Open a new terminal and cd to the project folder. Run git init . to initialize a new repository in the folder we're developing our application in.

$ git init
Initialized empty Git repository in /tmp/coderetreat/.git/

git has a handy command, git status, that will tell you the current state of your project. You can run this any time without any consequence, just to check what git thinks has changed.

Now git add . will add all files in the folder to the "stage". We can commit this stage to git by running git commit -m "Add boilerplate with a failing testcase", where the string is the commit message in which we describe what we changed.

🎉 Congrats, you just set up your project with a failing test-case and you're all set for the coderetreat!