changing git repository for version control

5 ビュー (過去 30 日間)
David Streng
David Streng 2021 年 8 月 30 日
編集済み: Raghava S N 2024 年 10 月 3 日
I'm using version control on a project and I need to change the git server i'm using but I can't find a way to do this. I've found the repository location (in the Git details) but I can't type in the window and can't delete anything. Is there anyway to change the repository, or do I just need to make a new project?

回答 (1 件)

Raghava S N
Raghava S N 2024 年 10 月 3 日
編集済み: Raghava S N 2024 年 10 月 3 日
Before using Git source control in MATLAB, it needs to be specifically set-up for MATLAB. There are seven recommended steps that need to be followed
  • Register your binary files with Git to avoid file corruption. (Required for all systems)
  • Enable support for long paths for Git on a Windows system. (Recommended for Windows Systems)
  • Configure MATLAB to sign commits. (Optional)
  • Configure MATLAB to use Git SSH authentication or install a Git credential helper to prevent frequent login prompts. (Optional)
  • Configure Git to use Git LFS if you are working with large files. (Optional)
  • Configure external Git tools to use MATLAB for Diff and Merge. (Optional)
Once the setup process is completed, Git can be used in MATLAB. Refer to this link for more details on using Git in MATLAB - https://www.mathworks.com/help/matlab/matlab_prog/use-git-in-matlab.html.
To change your repository, use the following command to update the remote URL. Replaceoriginand the URL with your remote name and new URL:
!git remote set-url origin https://new.git.server/your/repo.git
Run this command to ensure the URL has been updated correctly:
!git remote -v
Hope this helps!

カテゴリ

Help Center および File ExchangeSource Control についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by