Git and Github Tutorials | How to use GitHub & Git Commands

Опубликовано: 10 Сентябрь 2022
на канале: Precious Iriaevho
5,322
81

Git and Github Tutorials | How to use GitHub & Git Commands

This video will go over the Git and Github Tutorials | How to use GitHub & Git Commands

Git and GitHub for source control management (SCM). We start with Git. What is it? How you can get it running on your system, and how you can start working with it?

Then we look at GitHub.com, a platform for hosting and collaborating on Git repositories. By the end of this video, you'll be well on your way to using Git and GitHub. If you'd like to follow along, I've included sample files down below.

GIT COMMANDS
Set configuration values for your username and email
git config --global user.name YOUR NAME
git config --global user.email YOUR EMAIL

Set default branch to main
git config --global init.default branch main

Get help on a command
git help COMMAND
git COMMAND -h

Initialize a new git repository
git init

Clone a repository
git clone REPOSITORY URL

Add a file to the staging area
git add FILE

Add all file changes to the staging area
git add --all
git add -A
git add .

Check the unstaged changes
git diff

Commit the staged changes
git commit -m "MESSAGE"

Reset staging area to the last commit
git reset

Check the state of the working directory and the staging area
git status

Remove a file from the index and working directory
git rm FILENAME

Rename a file
git mv (OLD NAME) (NEW NAME)

List the commit history
git log

List all the local branches
git branch

Create a new branch
git branch BRANCH NAME

Rename the current branch
git branch -m NEW BRANCH NAME

Delete a branch
git branch -d BRANCH NAME

Switch to another branch
git switch BRANCH NAME

Merge specified branch into the current branch
git merge BRANCH NAME

Create a connection to a remote repository
git remote add (NAME) (REPOSITORY URL)

Push the committed changes to a remote directory
git push (REMOTE) (BRANCH)

Download the content from a remote repository
git pull REMOTE



#git #github #githubtutorial


На этой странице сайта вы можете посмотреть видео онлайн Git and Github Tutorials | How to use GitHub & Git Commands длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Precious Iriaevho 10 Сентябрь 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 5,322 раз и оно понравилось 81 зрителям. Приятного просмотра!