49. Learn Git Basics and Github CLI Commands - Full stack web development Course смотреть онлайн
In this Full Stack Web Development Tutorial Course video, We will be learning about a few basic #git #commands which we will be requiring on a regular basis. First of all we will open the terminal and create a directory and files inside it using the following commands:
mkdir git-fun
cd git-fun/
touch README.md
After creating the file we will add a few texts and make some changes to the file through the terminal.
- To open the file we are going to use the terminal text editor “vim” which opens up the text editor for the README.md file.
- To add some texts to the file we will enter into the INSERT mode by typing “i”. After adding texts into the file we will press “esc” a couple of times and “shift + : ” then “x” to save and quit.
The file to be identified as a git file we first have to initialise the repository as a git repository. Below is the step by step procedure:
git init: Used to create a new blank repository or to make an existing project as a Git project.
git status: displays the state of the working directory and the staging area. It lets you see which changes have been staged, which haven't, and which files aren't being tracked by Git. Status output does not show you any information regarding the committed project history.
git add ‘fileName’: If our file name appears in a red color, it shows that the particular git file is untracked or not committed. The git add command adds a change in the working directory to the staging area. It tells Git that we want to include updates to a particular file in the next commit. After which the file name appears in green in the git status. However, git add doesn't really affect the repository in any significant way—changes are not actually recorded until you run git commit.
git commit -m “commit message”: This will prompt us for a commit message. We’ve now stored the first version of your project in Git. It adds the changed files into a commit with a commit message as stated inside the inverted commas. But before committing we should make sure that our file or code is bug free.
Now if make any further changes into the README.md file and create another file inside the directory, they both appear red in the git status. However both of them don't mean the same. README.md appearing in red means we haven’t added and committed the recent changes inside the file while the other file name appearing in red means an untracked repository. This can be resolved by:
git add README.md: Adds the recent changes in the file.
git add -A: Adds all the files that are untracked.
git commit -m ‘message’: commits both the changes made to the repository.
git add commands:
git add -A stages all changes
git add . stages new files and modifications, without deletions
git add -u stages modifications and deletions, without new files
Incase we want to revert back a commit:
git log: allows us to view information about previous commits that have occurred in a project. The simplest version of the log command shows the commits that lead up to the state of the currently checked out branch. These commits are shown in reverse chronological order (the most recent commits first).
git checkout: The git checkout command can be used in a commit, or file level scope. A file level checkout will change the file's contents to those of the specific commit.
Working with branches:
git branch – to display the projects branches
git branch new-branch-name – to create a new branch of the master branch. It will have the complete copy of the master branch
git checkout new-branch-name – to make code changes on the branch without making any changes on the master branch
git push –set-upstream origin new-branch-name – to create the newly created branch to #GitHub repository
----------------------------
Week 2 : Day 2
Section 6 : Version Control With Git
Tutorial 49: Learn Git Basics and Github CLI Commands
----------------------------
Do subscribe and hit Bell Icon
----------------------------
Follow us in social media handles for opportunities and code related support.
Instagram: https://www.instagram.com/wb.web/
Facebook: https://www.facebook.com/wbweb/
Twitter: https://twitter.com/wbweb_in/
LinkedIn: https://www.linkedin.com/company/wbweb/
----------------------------
Got a question on the topic? Please share it in the comment section below and our experts will answer it for you.
For more information, please write back to us at [email protected] or call us at IND: 7077568998
After completing the course, write to [email protected] for internship or freelancing opportunities.
For consultation or partnership related queries drop a mail to [email protected]
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «49. Learn Git Basics and Github CLI Commands - Full stack web development Course» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.