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

Publié le: 10 septembre 2022
sur la chaîne: 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


Sur cette page du site, vous pouvez voir la vidéo en ligne Git and Github Tutorials | How to use GitHub & Git Commands durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Precious Iriaevho 10 septembre 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 5,322 fois et il a aimé 81 téléspectateurs. Bon visionnage!