I have a project stored in a Git Repository, I open the project from the local Git folder. I want to edit the workflow and then commit my changes to the repo. When I add a new xaml sequence, I am able to Commit and publish it at first but when I go to change my branch, merge, or exit the file I get the below error. I click commit/save again and it is automatically deleted from my project.
This isn’t a fix, but more of a suggestion. To correct errors like this, close UiPath Studio, and use GitHub for Windows directly on the command line. It’s not ideal, but when faced with errors in using UiPath to push changes, the command line will always work.
But I’ll add that you’re on Windows: reboot your computer and try again It should unlock the file preventing the rebase/fastforward/etc. because often, to process the operation you git “client” will go back in history and try to delete files/directory in the process.
or you might close all open files, all file explore implying a directory inside your project, etc.
Error: LibGit2Sharp.LibGit2SharpException: could not rmdir ‘C:/Users/p2934930/Documents/Repos/UiPath/Billing_Assurance_Melissa_Data/’: The process cannot access the file because it is being used by another process.
at LibGit2Sharp.Core.Ensure.HandleError(Int32 result)
at LibGit2Sharp.Core.Proxy.git_checkout_tree(RepositoryHandle repo, ObjectId treeId, GitCheckoutOpts& opts)
at LibGit2Sharp.Repository.CheckoutTree(Tree tree, IList1 paths, IConvertableToGitCheckoutOpts opts) at LibGit2Sharp.Repository.Checkout(Tree tree, IEnumerable1 paths, CheckoutOptions options)
at LibGit2Sharp.Commands.Checkout(IRepository repository, Tree tree, CheckoutOptions checkoutOptions, String refLogHeadSpec)
at LibGit2Sharp.Commands.Checkout(IRepository repository, Branch branch, CheckoutOptions options)
at UiPath.Studio.Plugin.Git.Wrappers.CommandsWrapper.Checkout(IRepository repository, Branch branch, CheckoutOptions options)
at UiPath.Studio.Plugin.Git.Services.Core.CheckoutBranchService.<>c__DisplayClass4_0.b__1()
at UiPath.Studio.Plugin.Git.Services.Core.ExecuteWithCurrentDirectoryService.Execute[T](String workingDirectory, Func1 func) at UiPath.Studio.Plugin.Git.Services.Core.CheckoutBranchService.Checkout(IRepository repository, Branch branch) at UiPath.Studio.Plugin.Git.Services.UI.ManageBranchesService.<>c__DisplayClass25_0.<CheckoutSelectedBranch>b__0(IRepository r) at UiPath.Studio.Plugin.Git.Services.Core.GitSession.ThreadSafeExecute[TResult](Func2 action, Func1 repoFactory) at UiPath.Studio.Plugin.Git.Services.Core.GitSession.<>c__DisplayClass14_01.b__0(CancellationToken _)
at UiPath.Shared.ProducerConsumerPair.<>c__DisplayClass18_01.<StartNew>b__0() at System.Threading.Tasks.Task1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.Studio.Plugin.Git.Services.Core.GitSession.d__141.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at UiPath.Studio.Plugin.Git.Services.UI.ManageBranchesService.<CheckoutSelectedBranch>d__25.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at UiPath.Studio.Plugin.Git.Services.UI.ManageBranchesService.<ExecuteSelectedAction>d__27.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at UiPath.Studio.Plugin.Git.Services.UI.ManageBranchesService.<ManageBranchesCommandExecute>d__24.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at UiPath.Studio.Plugin.Git.Services.UI.ManageBranchesService.<<get_ManageBranchesCommand>b__21_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at UiPath.Studio.Shared.MVVM.Commands.TaskCommand3.d__32.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_0(Object state)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler), HResult -2146233088
You might also try this for verifying which specific files are locked.
Copy your entire project directory (make sure everything is copied successfully).
Attempt to delete the original. You will get an error for files which are locked.
And actually, you might be able to just copy your project and update your branches on the copy. That would become your new working project directory. I can’t think of any reason why the copy would have locked files.