I was playing around with assembla and I created fork of my own repository by selecting:
Source/Git tab -> Fork network -> Fork -> fork to a new tab in this space
now, I would like to delete the forked repository, without deleting the orginal one, but I can't find a suitable option. Do anyone know how can I delete it?
You should have 2 tools in your space now. You can remove your secondary tool through: Admin tab -> Tools -> delete the second tool probably named source/git.2
Related
I have shelved my 26 java files changes via Intellij Idea 2016.2.1 and I checkout to different branch.
When I came to old branch to check my shelved changes.
I gone a mad now, I lost all the files. I was worked nearly two months
Can somebody help to get it back?
You can restore the state of those files if they were edited in IntelliJ. Use local history to see all the changes made in IntelliJ (VCS -> Local History -> Show History).
Even there isn't Shelf tab in IDE you can find shelved changes as patch files at {ProjectName}/.idea/.idea.{ProjectName}/shelf/.idea/shelf.
Then your can apply any selected patch.
I was able to view lost changes and revert back to them by:
right click on project directory, select Local History > Show History
Find the entry in the history menu that you want to restore. You can examine the files by double clicking on the entry and the files to examine differences.
Right click on the entry you want to restore, and select Revert
Note in my case Git>VCS Operations>Show History showed nothing. Only through the Project Files menu.
Andrei's answer was helpful for my situation where I renamed my project and my previously shelved changes were no longer found under the shelf, but I did run into an issue when applying the patch file because I was prompted to "Select missing base" for various files in the patch. Similar to what is seen in the screenshot below:
https://youtrack.jetbrains.com/issue/IDEA-183910
I was able to avoid having to "Select missing base" for various files by first changing the default shelf location and then applying the patch.
https://www.jetbrains.com/help/idea/shelving-and-unshelving-changes.html#change-shelve-location
Also, I found my patch in this location:
{ProjectName}/.idea/shelf
instead of the aforementioned location:
{ProjectName}/.idea/.idea.{ProjectName}/shelf/.idea/shelf
Maybe this will help someone:
I lost part of my shelved changes in combination with an update of IntelliJ. I'm not sure if the update was the reason but eventually most of my most recent (and important) changes were gone.
I couldn't restore them from local history as this does not "survive" an update of IDEA. But in the files I saw that there still is some data:
C:\Users\myUser\AppData\Local\JetBrains\IntelliJIdea2021.2\LocalHistory had a changes.storageData with ~50MB.
Copying the files to the folder of the new version didn't help as the files got overwritten again.
Solution:
I was able to get the old version of IntelliJ (2021.2) here and installed it. This can be done in parallel, without removing the newer version.
Here I was able to retrieve my changes from the Local History and shelve or apply them again.
Hint: Backup the "Local History" folder (or the whole IntelliJIdea20xx.x folder) before you start. I don't remember if I had to copy it in there again or if it worked out of the box. (Just to be sure the local history doesn't get lost).
I've also experienced this bug repeatedly and hence no longer use shelved changes, but rather the Git CLI directly. As of 2022 Jetbrains IDE's still cannot be trusted with their "Smart Checkout" feature, which has a small probability of the total loss of your files (experienced personally in both IntelliJ & Rider).
Unlike another comment here regarding using the Local History, this did not work for me as the history showed nothing. I've also lost many hours of work due to this bug which remains unfixed.
The solution is to use "git stash -u" on the command line, then checkout the desired commit. Once youre done, type "git stash apply" to restore your files. Trusting the "smart checkout" feature is like playing Russian roullette. It's IDE magic that may just fail and you lose everything.
Is it possible to create branches in Perforce in a similar style to Git? I.e. without creating a new folder.
I would prefer for my client to manage the branches transparently whilst I work against a single copy of the directory tree on disk.
It seems awfully wasteful for the client to create an exact copy of the entire tree if you're only modifying say a couple of files. I much prefer Git's workflow in this regard.
If it's not possible using straight Perforce I'm happy to move to GitSwarm.
For info I'm running Perforce version 2015.1/1233444.
Possible yes, but with the centralized version of the system it involves a bit of 'magic'. Basically, the branch part doesn't need to involve the client at all anymore. Take a peek at p4 populate. That'll create another folder on the server, but won't do anything locally. Then you can edit your client workspace to map the branched files instead of the trunk files, and it'll just re-sync over top the files on your disk.
Now, having said that, if you wanted to take a look at our DVCS version of working, then you can just do "p4 switch -c " and it'll create a new branch locally, switch your workspace over to it (shelving any open current work in the process) and away you go.
My original answer was deleted because I thought a link was a better idea than repeating content. My mistake.
At any rate, I believe the DVCS features in Perforce Helix supply exactly the sort of thing you're after. In a blog I wrote in the subject (link here for reference) I explained how to create a new in-place branch with a single command:
p4 switch -c newBranchName
That will create a new branch with the name "newBranchName" and save any existing work in progress by default. To discover on which branch you're working you can use the switch command with the list argument as follows:
p4 switch -l
That would show you output like this, the asterisk showing that you're now working on the newBranchName branch.
newBranchName *
main
You can switch back and forth as you like, changing contexts as needed as often as you like. Your work in progress will continue to be saved on each branch in progress. When you're ready to merge your work back to main and push it back to the server, you can use the following sequence of commands:
p4 switch main
p4 merge --from newBranchName
p4 resolve –as
The first command switches back to the main branch, the second merges your work from the newly created branch into main, and the third resolves any potential conflicts automatically. If there are any conflicts that can't automatically be merged, then you can use the usual commands to walk through the resolution process.
Alternately, if you prefer to stick with Git, you can use that directly with our Helix Versioning Engine through our Git Fusion technology or use Git directly with our new GitSwarm technology. That is a pretty amazing option (in my opinion) as it makes it possible to mirror content automatically and bidirectionally between GitSwarm and the back end server. That way you get all the features of Git with GitSwarm (which itself is based on GitLab) and all the goodies from the rest of Helix.
Hope that helps!
If you use streams (Perforce's "managed" version of a branch, as opposed to doing completely ad hoc inter-file branching with arbitrary paths), it's pretty simple. As P4Gabe said, "switch -c" is a one-shot option on a local server.
On a shared server it's only a little more complicated because you have to do the "populate" explicitly (this is to keep naive users from accidentally branching lots of files lots of times on a shared server), but it's still only a few steps and it's something that you as an advanced user could script easily:
p4 stream -P (current stream) -t development (new stream name)
p4 populate -r -S (new stream name)
p4 switch (new stream name)
The equivalent is possible using ad hoc ("classic") branches as well if you have a good understanding of how client views work -- use populate to create the new branch, modify your client view to map the new branch into the namespace currently occupied by the old branch, and sync.
This blog post on what exactly "p4 switch" does might help if you're trying to engineer your own solution that's similar-to-but-not-quite the "switch" command: https://www.perforce.com/blog/150428/p4-switch-switching-it
I'm looking to do something similiar in functionality as git cherry-pick. My situation is thus: I mistakenly promoted from from stream C to Stream B, realized it was an error and reverted the transaction, this succeeded. But unfortunately I now no longer have the code In stream C that I had before the promote. I've tried doing a send to workspace and merged the underlaps but this puts me in the same place I was in before, I no longer have my changes. if I keep the overlaps I get overlaps with almost all the files.
I'm really at wits end, I know if this was Git I would have reverted my bad commit, merged the reversion into my feature branch, then cherry-picked the original commit.
accurev has broken me, I'm ready to cry and need some help :,(
In the future, you could have done a demote (new feature in AccuRev 6.2.0) of your changes in streamB and put them back in streamC (very slick new feature IMO).
To resolve your situation, perform the following steps.
Hang a workspace off of streamC.
Update this workspace.
Right click on streamB -> Show History -> Select the promote transaction -> Right click -> Send to Workspace -> Choose workspace from step 1.
Depending on your version of AccuRev, click on the "Default Group" filter or "Outgoing" filter.
Select all of the files included from the send to operation -> Right click -> Merge. You will not want to automatically keep the merge, but need to manually select the version of the file in your workspace (lower right hand pane). This contains the changes from your initial promote. After you have done this, keep and exit.
Now promote your changes into streamC.
The demote feature basically does all these steps for you in one operation BTW.
I have recently installed eclipse indigo and egit V1.3 and configured my project in it. I am unable to use the Team->Merge Tool as per the documentation in http://wiki.eclipse.org/EGit/User_Guide#Using_Merge_Tool in case of conflicts. The Merge Tool option is disabled. A search in google points me to https://bugs.eclipse.org/bugs/show_bug.cgi?id=339092, but looks like this bug has been resolved in the new version. Is there something else I need to configure ?
I am directly working on the master branch. Am I missing something ?
Synchronize View is also called "Comparing with Branches".
It does comparisons (not merge per se). It allows you to see differences (and detect potential conflict, should you merge them), it doesn't start the merge.
Should you pull/merge/cherry pick the remote branch to your local branch, then the merge tool should be active.
After you get from Eclipse the ugly CheckoutConflictException, the Eclipse-Merge Tool button is disabled.
Git need alle your files added to the Index for enable Merging.
So, to merge your Changes and commit them you need to add your files first to the index "Add to Index" and "Commit" them without "Push". Then you should see one pending pull and one pending push request in Eclipse. You see that in one up arrow and one down arrow.
If all conflict Files are in the commit, you can "pull" again. Then you will see something like:
\< < < < < < < HEAD Server Version \======= Local Version > > > > > > > branch 'master' of ....git
Then you either change it by the Merge-Tool, which is now enable or just do the merge by hand direct in the file. In the last step, you have to add the modified files again to the index and "Commit and Push" them.
Checking done!
I had similar problem after not good merging trying. The option was disabled, and in the repo's view it was missing.
Making reset solved the problem. See image.
I checked a specific tag representing some release from CVS using intelliJ Idea 9.0. Now I made few fixes to the code and want to create a branch for the same release starting from this tag. So what I want to do is exactly this: Start branch (before I commit my changes it will be the same as the tag) and keep the tag as it is for reference.
I wonder if command CVS -> Create branch on the project root in IntelliJ will do the trick. I went through the official IntelliJ doc but it's still unclear to me if the branch will be created from the currently checked out tag.
Yes, Create branch should work as you expect.