common git command to play with git

Опубликовано: 10 Май 2020
на канале: Tech Guru
43
6

we start learn about some basic command which really help full to us to manage our git account without any software

git clone [url] - This command is used to obtain a repository from an existing URL.

git add [file] - This command adds a file to the staging area.
git add * - This command adds one or more to the staging area.

git commit -m “[ Type in the commit message]” - This command records or snapshots the file permanently in the version history.
git commit -a - This command commits any files you’ve added with the git add command and also commits any files you’ve changed since then.

git push [variable name] master - This command sends the committed changes of master branch to your remote repository.
git push [variable name] [branch] - This command sends the branch commits to your remote repository.
git push –all [variable name] - This command pushes all branches to your remote repository.

git pull [Repository Link] - This command fetches and merges changes on the remote server to your working directory.

git status - This command lists all the files that have to be committed.

git log - This command is used to list the version history for the current branch.

git show [commit] - This command shows the metadata and content changes of the specified commit.

git init - This command is used to start a new repository

git branch - This command lists all the local branches in the current repository.
git branch [branch name] - This command creates a new branch.
git branch -d [branch name] - This command deletes the feature branch.

git checkout [branch name] - This command is used to switch from one branch to another.
git checkout -b [branch name] - This command creates a new branch and also switches to it.

git merge [branch name] - This command merges the specified branch’s history into the current branch.

git remote add [variable name] [Remote Server Link] - This command is used to connect your local repository to the remote server.

git stash save - This command temporarily stores all the modified tracked files.
git stash pop - This command restores the most recently stashed files.
git stash list - This command lists all stashed change sets.
git stash drop - This command discards the most recently stashed change set.


На этой странице сайта вы можете посмотреть видео онлайн common git command to play with git длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Tech Guru 10 Май 2020, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 43 раз и оно понравилось 6 зрителям. Приятного просмотра!