How to fix the problem of executing gitenv.csh file failed
2017-07-26 16:54
459 查看
How to fix the problem of executing “gitenv.csh” file failed
The Problem
Today when I checkout from one branch to another branch,I can’t use the command of ‘rsarte_rac_oam’.I guess there has someting wrong with my gitenv,so I execute the gitenv.csh with the command source gitenv.csh but failed.The Reason
The reason is that whenever we checkout form one branch to another,we should clean some tmp config/files of the last branch.If we don’t do that,it may occur faults.How To Fix This Problem
Clean up the submodulesgit submodule foreach git clean -dfx
Clean up lrat
git clean -dfx
Switch to your local dev branch
git checkout dev
Fetch the latest from origin/dev and prune any branches that no longer exist
git fetch -p
Reset your dev branch to match origin/dev
git reset --hard origin/dev
Update the submodules
git submodule update
Reset your environment
source gitenv.csh (or gitenv_dul20.csh, or gitenv.sh, or gitenv_dul20.sh)
If these operations don’t work,you need to create a new repo.
How To Avoid This Problem
Whenever you change your working branch,please do the command source gitenv.csh at once.相关文章推荐
- How to fix the problem of " Session Lost "
- Q&A: HOW TO FIX XCODE’S "USED AS THE NAME OF THE PREVIOUS PARAMETER" WARNING
- How to delete the log file of log4j dynamically
- How to Shrink the Datafile of Temporary Tablespace
- how to fix the problem when you install matlab on *nix-- "libXp.so.6 : cannot open "
- How to fix the dreaded "java.lang.OutOfMemoryError: PermGen space" exception (classloader leaks)
- how to fix GIT error: object file is empty?
- vmware:Cannot open the disk 'XXX' or one of the snapshot disks it depends on. reason: failed to lock the file.
- svn问题之一: Failed to add file 'xxx': an unversioned file of the same name already exists
- How to redirect the output of DBMS_OUTPUT.PUT_LINE to a file
- how to fix the problem when you install matlab on *nix-- "libXp.so.6 : cannot open "
- mt.exe : general error c101008d: Failed to write the updated manifest to the resource of file
- Git 管理多个分支的公共部分 How to manage the common part of multiple branches
- In C# how to find the mime type of a file
- How to Fix the Problem "Could not get lock /var/lib/dpkg/lock"
- How to get the size of file in C++ - 在C++中如何获取文件的大小
- How to fix the dreaded "java.lang.OutOfMemoryError: PermGen space" exception (classloader leaks)
- How to fix the problem that the Download rate is too Slow when doing "apt-get install"
- How to get the Diagnostic data and debug file of Sales Order pick release
- the diary of how to get a random word within a file