A conceptual and practical introduction to Git for beginners

in-tech-gration
in-tech-gration
108 بار بازدید - 2 روز پیش - A break down of the
A break down of the topics of this session: A high level overview of the concept of "State" in software and how various applications keep track of state changes and provide a version history. Then, we move on to understand Git as a software that tracks changes in any system folder and get a conceptual overview of how it works (staging area, working area, commit history, etc.) Finally, we go through some of the basic commands (git add, git commit) to actually take snapshots of file changes and store them in a permanent history log. Enjoy, share and leave your comments and feedback. ========================== Commands used in the session: ========================== `cd`: changes to a specified directory or to the parent directory (`cd ..`) `ls`: lists the contents of the current directory `clear`: clear the terminal from any text `rmdir`: delete a directory (be extremely careful with this command) `touch FILENAME`: creates an empty file on the current directory, e.g. `touch PROFILE.txt` Git Commands: `git --version`: shows the version of git and ensures that it is installed on your system `git init`: initialize a folder/directory as a git repository so that git can start track changes that happen inside the files and sub-folders of that folder. `git status`: shows an overview of what is happening in the git repository `git diff`: compares and shows the different between different files, `commits` and `branches`. `git add FILENAME`: take a snapshot of a file (or files) and store (add) them in the `staging area`. The `staging area` is the stage before adding some changes that happened to a file in the `git history` which acts like a long-term memory for git. `git help COMMAND`: shows a help screen for a particular command, e.g. `git help commit`, `git help add`, etc. `git log`: shows the `commit history`. A shorter view can be shown via `git log --oneline` `git commit`: add some changes to the `git history`, accompanied by a descriptive message, e.g. `git commit --message "My first commit entry"` or `git commit -m "Message"` for short.
2 روز پیش در تاریخ 1403/07/11 منتشر شده است.
108 بـار بازدید شده
... بیشتر