![]() ![]() ![]() The above command sets back the remote origin to your current origin: you want this because you are in your existing folder and you probably do not want to mix up your current local folder name with the new folder you are going to create for cloning the repo you just pushed to. Of course it preserves all history as with git all history is also pushed. ![]() The above command pushes the current active local branch to remote with branchname develop. ![]() Keep the server up-to-date yum update -y 2. Get started Using a System Package python -version Python 2.7.5 Using a Software Collection scl enable rh-python35 bash python -version Python 3.5. Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. The above command gives the current remote origin url, useful to set the origin back to in the last step git remote set-url origin above command sets the remote origin to the new location git push -set-upstream origin develop Software Collections give you the power to build, install, and use multiple versions of software on the same system, without affecting system-wide installed packages. We start by running the command: roothost git config Next, we add our name and email address as git applies this information to each commit we make. Now in the folder do git remote get-url origin Setting up Git on CentOS Now that we have git installed, we need to configure it so that it links to a repository. The -reuseaddr option allows the server to restart without waiting for old connections to time out, while the -base-path option allows people to clone projects without specifying the entire path, and the path at the end tells the Git daemon where to look for repositories to export. 17 Answers Sorted by: 262 To add the new repo location, git remote add newreponame newrepourl Then push the content to the new location git push newreponame master Finally remove the old one git remote rm origin After that you can do what bdonlan said and edit the.git/config file to change the newreponame to origin. This step creates a repository where we can push code to sudo k3s server & Kubeconfig is written to /etc/rancher/k3s/k3s.yaml sudo k3s kubectl get node On a different node run the below command. First locally go to the (git)folder you want to move over.If you want to move from one origin to another and also keep a backup of your current origin on your local machine you could use these steps: ![]()
0 Comments
Leave a Reply. |