Git commands and workflow

Опубликовано: 27 Октябрь 2023
на канале: Tutorials Zoom
755
like

Most used git commands

**git init**: Start your project by initializing a new Git repository in your current directory.

**git clone “repository”**: To work on an existing project, clone it to your local machine.

*Make Changes*

**git status**: Check the current status of your files before or after making changes.

*git add “filename”* Stage a specific file for a commit.

**git add . or git add -A**: Add all changed files to the stage at once.

**git commit -m "Commit message"**: Commit your staged changes with a descriptive message.

*Branching*

**git branch**: List all local branches in your repository.

*git branch “branchname”* Create a new branch.

*git checkout “branchname”* Switch to a different branch.

*git merge “branchname”* Merge changes from one branch to another.

*Remote Repositories*

*git push origin “branchname”* Send your commits to the remote repository.

**git pull**: Keep your local repo up-to-date with changes from the remote repository.

**git remote -v**: Check which remote servers are connected to your local repository.

*Key Differences*

**git fetch vs. git pull**: Both get data from a remote repository. Git fetch just downloads it, while git pull also merges it into your local files.

**git merge vs. git rebase**: Git merge combines branches with a new commit, while git rebase moves or combines commits for a cleaner history.

**git reset vs. git revert**: Git reset discards local changes, while git revert undoes changes by creating a reversing commit to preserve history.

Image credit: Santosh Kumar Mishra Bhaiya
Learn web development at W3Schools.com

#Git #VersionControl #Coding #Development #LinkedIn
#programming #react #softwaredevelopment #deepakshankardubey
#html #css #javascript #100daysofcode #webdevelopment #linkedinforcreator #linkedin
#Git #VersionControl #CodingLife


На этой странице сайта вы можете посмотреть видео онлайн Git commands and workflow длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Tutorials Zoom 27 Октябрь 2023, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 755 раз и оно понравилось like зрителям. Приятного просмотра!