A short description of the post.
How to select all the files that you need to push, instead of click the “Staged” boxes one by one, here is the magic:
Use the following commands in RStudio’s Terminal
git add -A (–all) Adds everything, so that everything in your folder on disk is represented in the staging area
git add . Stages everything, but does not remove files that have been deleted from the disk
git add * Stages everything, but not files that begin with a dot & does not remove files that have been deleted from the disk
git add -u (–update) Stages only Modified Files, removes files that have been deleted from disk, does not add new
git add <file name 1> <file name 2> Adds only certain file(s)
** I like to use git add *, and I used a lot when I was creating my blog.
Then, use git commit -m "[AN UPDATING MESSAGE]", this command helps commit all the selected files and with a message
Then, use git pull
Finally, use git push origin [YOUR WORKING BRANCH NAME, SOMETHING LIKE master]
If you accidentally selected all the files that you shouldn’t select and push, just use git reset, it will cancel and reset everything back.
For attribution, please cite this work as
Lei (2021, March 22). BYU-I Data Science Society: Small blog creating tips. Retrieved from https://byuidss.github.io/posts/2021-03-22-small-blog-creating-tips/
BibTeX citation
@misc{lei2021small,
author = {Lei, Lisa},
title = {BYU-I Data Science Society: Small blog creating tips},
url = {https://byuidss.github.io/posts/2021-03-22-small-blog-creating-tips/},
year = {2021}
}