Posts

Showing posts with the label git

How to changing the GIT remote repository

Image
Changing the GIT remote repository When using GIT, the remote server may be transferred to another server or the address of the existing server may change.  At this time, simply change the Git remote repository to the address of the server you migrated to. 1. Remove the existing Git remote repository Git's default remote server is usually set to origin.  We will remove the existing Git remote repository and add a new Git remote repository. You can change it with the command below. If you use a different name, please write the name of the remote repository you are using. git remote remove origin 2. Adding a new Git remote repository Add a new Git remote repository with the following command. git remote add origin [새로운 주소] With the above command, you can keep the existing remote repository and add new repositories other than origin.

How to get GIT remote branch

Get GIT remote branch Since Git is a distributed version control system, local and remote repositories may be different.  Branches are also remote, but may not be local. Let's look at the command to import a branch of a remote repository into a local repository. 1. Remote View remote repositories The local repository may not have all the branches of the remote.  You can view the list of branches in the remote repository with the following command. git branch -r [root@localhost myapp] # git branch -r origin/dev origin/master origin/release 2. View the remote repository branch source You don't need to have the same source locally in the remote repository branch.  If you just want to see it,  checkout you can do  it temporarily with a remote branch  .  checkout The command is to switch to a different branch.  If you enter the remote branch name here, you can temporarily checkout the remote branch. git checkout [원격 브랜치 이름] I...