There are several more things to learn about Git, I will explain them in a separate post. To better demonstrate the pull and merging process let us consider the following example. Then a git merge is executed to merge the remote content refs and heads into a new local merge commit. So these are the most helpful git commands I find in my everyday programming. The git pull command first runs git fetch which downloads content from the specified remote repository. Git config -global user.email globally Email id Git config -global user.name "your_username" ![]() Git remote set-url origin a repository's origin branch to SSH Git remote add origin a remote repository Update local repository to the newest commit Push changes to remote repository (remembered branch) They can be used to create both incremental and full backups of a repository, and to relay the state of the references in one repository to another. Bundles are used for the 'offline' transfer of Git objects without an active 'server' sitting on the other side of the network connection. Push changes to remote repository (and remember the branch) Create, unpack, and manipulate 'bundle' files. Stash changes in a dirty working directory This configuration will tell git to show the relationship between the two branches in git status and git branch -v. If a is given, it is used as a shell.List of branches (the asterisk denotes the current branch) Option -r causes the remote-tracking branches to be listed, and option -a shows both local and remote branches. Useful Git Commands List CommandĪdd all new and changed files to the staging area ![]() So I'm going to share the most useful Git commands in this post that every developer should know.īut first you need to know the fundamentals of Git to understand this article. ![]() But some commands are more commonly used. Since you can use a lot of different commands, mastering Git needs time. Git is an important part of daily programming and is commonly used in the software industry.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |