/
GIT Add

GIT Add

So just creating a new file inside of your repository directory isn’t enough to register the file with GIT. First you need to “add” it.

How do we do that?

I’ll give an example. I am making a repository of our website. I go to a page and save the page as a complete web page in my repository.

Now from the command line I type “git status” and see this:

Now I can use “git add package.html” to add the html page, I follow that with git status:

Wahoo! Now packages.html is “staged” for a commit. I’ll talk about this in git commit.

Next I do “git add package_files/” and we see this:

Excellent! Now we are ready to do git commit to commit the changes to GIT.

Related content

GIT Commit
GIT Commit
More like this
Create a repository with local files and connect to remote
Create a repository with local files and connect to remote
More like this
GIT Commit with VI
GIT Commit with VI
More like this
Basic workflow of git for day to day use
Basic workflow of git for day to day use
More like this
Merge conflict
Merge conflict
Read with this
GIT Add Tricks - wildcards and interactive adding of files
GIT Add Tricks - wildcards and interactive adding of files
More like this