Small blog creating tips

Tip Terminal Blog

A short description of the post.

Lisa Lei
03-22-2021

Tip 1. Use Terminal commands to push all your working files

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

  1. 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.

  1. Then, use git commit -m "[AN UPDATING MESSAGE]", this command helps commit all the selected files and with a message

  2. Then, use git pull

  3. Finally, use git push origin [YOUR WORKING BRANCH NAME, SOMETHING LIKE master]

  4. 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.

HTML Color Codes

CSS font code

Citation

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}
}