You can think of a method as an action that a number, string or object can perform or have taken on it.
Primitives are immutable and passed by value. Objects are mutable and stored by reference.
Everyone should know how to use a version control because it is important to be able to see your history of code you been working on.
Git is a very powerful and a common version control system.
It is a popular version control system
There is a lot of commands. Here are a few important commands that everyone should know.
This is where everything is stored.
Copies a git repository located at url into a new directory in your working directory. Includes all files, history and branches.
A “fork” on Github will create your own copy of a repository. (makes you the owner of a new copy)
Shows current state of the repository. Displays changed files, added files, and removed files.
In simple terms it shows you the status of everything.
Tell Git to include all the files at a [path] in the next commit. If you modify the files after git-adding them, git will remember their initial state when you added them.
To cancel the git add use the git reset. which just undos git add.
Index is tracking the difference between the working directory and any commits you make. Index are things that are staged for next commit.
restores state to a specific commit
– soft flag will not affect files – hard files will discard all changes
creates a new checkpoint in the project status along with a message. Stores the state of any added files.
Use the -a flag to automatically add all tracked files (files already know to git from previous git add commands)
Use -m flag to use the message as the commit message
Git is a very powerful tool to help you keep your files safe.
The commands every should know are…
git reset [soft | hard ] [commit] |
happy coding
You can think of a method as an action that a number, string or object can perform or have taken on it.
Primitives are immutable and passed by value. Objects are mutable and stored by reference.