How can I see which files have changes with Webstorm/GIT/OSX? - macos

I have just started using Webstorm and OSX for my development with GIT. When I was using Windows I could use tortoise git and I would see little icons in Visual Studio and on the file system showing me the status of files such as /changed/same/ignored.
What I really want instead of the command line is to be able to see little status symbols on my files in 'finder'

WebStorm has VCS integration, it shows what files were changes, added or deleted in the Project view highlighting their names with different colors.
You could also see the changelists, use visual diff tool and more. I suggest watching this video on VCS integration in WebStorm and PhpStorm.

You could consider a shell like Prezto, illustrated in "ZSH/PREZTO GIT DIRTY PROMPT INFO".
Using this prompt setup, you can add information as to the current status of your repo:
Things like how long since the last commit, the current branch, whether I've added or modified files.
I also like to have two symbols, a green tick and a red lightning bolt visible as a general "you should commit your work" flag.

Related

Can`t see the file history in Gitlens (on a specific project)

I have a problem with Gitlens extension. Firstly, Gitlens or Git History extension is working fine on any other project except the this Laravel project. My problem is, can`t see the file history or line history in this project.
On the other hand, there is no problem in the git log (Git History Extension) as seen in screenshot;
But I can't compare any files with their any version (every commit seems like in the ss). I have no idea what the problem is about.
Lastly, I don't think the problem is about extension settings because other projects do not have this problem. Is there a any chance to fix this issue without resetting git history?
I am answering after 3 months, maybe it works for someone. As I mentioned in the title, surely there is no problem about extension settings for this specific project. The problem is just about git files. Maybe, I damaged some git files while moving the project on my desktop :)
So, there is no chance to fix this issue without resetting git history or starting fresh with git, if you`re having the same problem.
Do not play with git files, it`s no joke!
I've got a similar issue. My problem is in using symbolic links for folders.
I have this folder symlink for my repos.
C:\>dir
Directory of C:\
27.09.2018 21:07 <JUNCTION> repos [C:\Users\Qwerty\repos]
(GitLens v11)
The top editor is opened via C:\repos
The bottom editor via C:\Users\Qwerty\repos
You can see that some git features still work (yellow), but others don't.
However, this is very strange, because in my other repos, I have never observed such issues.
Also notice below that it is still possible to invoke the same action via a git lens popup and then it is possible to use the Prev Next Revision buttons.
Anyway, after more testing, I actually observe the same thing in my other repos. I assume that something must have changed between versions as I only observe these issues for last maybe 2-3 months. I even submitted a ticket that GitLens stopped working in v12.0.0 and later versions https://github.com/gitkraken/vscode-gitlens/issues/1979
The buttons completely disappeared and even the commit information
v11
v12
And Now actually, after having reopened my repo via original path and after updating GitLens back to v12.0.6 I see that it is working properly!
Bottom editor is opened via C:\repos symlink.

Using SVN, how do I selectively create a patch file?

I have a codebase with several changes in it that are best split up into several commits.
In git, I would use git add -p to select the changes I wanted from each file and create a commit and pull request based on those.
I'm new to SVN and I'm wondering about the best way to achieve this? It looks like I can do file-level selection, but not changes within those files?
I'm using TortoiseSVN as my local version control tool, but I'm happy to use another tool (has to run on Windows) if there's one that will do what I want.
This is something you won't get from SVN. Separating changes in your working area into multiple commit can only have a file granularity. You can't split changes from the same file into several commits.
So I'd say you should instead give a look at how git-svn works. It allows you to use Git over an SVN repository, with some limitations. You'll use git dcommit to push to the SVN repository for example. You must use a rebasing strategy over merging too. But otherwise, you get colored diffs, stash, rebasing, proper handling of multiple branches, proper formatting of patches by default, etc.
If you already know git, this will give you more, for less annoyance.
It looks like I can do file-level selection, but not changes within those files?
This is easily possible with VisualSVN plug-in for Visual Studio 2017. The feature is called QuickCommit and it helps you partially commit selected changes in a file.
Use the Commit this Block and Commit Selection context menu commands in the Visual Studio editor.
Here is an animated screenshot:

Is there a better way to make an initial GIT commit for a web application? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Git GUI.. stage everything
My employer is finally looking into setting up some source control after much pleading by all of the developers. Unfortunately, none of our developers, inclusive of myself, have ever done much with source control. I've looked into SVN and thought that would be fine but another of the developers didn't like it. I've moved on to looking at GIT as an option. I've downloaded the GIT GUI from http://git-scm.com and started tinkering with it which brings me to my question/problem.
The web application we're trying to add to source control (GIT) is 7,386 files and 712 folders. When doing the initial commit, from what I understand, I've got to click on each file I want to commit to move it from the Unstaged Changes to Staged Changes pane. Well obviously I am hesitant to sit and click 7,386 times (once for each file to commit). Is there another faster way to do this?
I'm currently using this page as my reference to learn to use the GIT GUI http://nathanj.github.com/gitguide/tour.html. If anyone has a better tutorial/reference for using the GIT GUI I'd much appreciate linking me to it.
Thanks
To add every file (that is not ignored), use
cd /path/to/workspaceRoot
git add .
I don't use any gui, but I think this should be possible by adding a directory (the root directory in this case).
Remember to create a appropriate .gitignore file before, so no unwanted files get added. You can check, what is (un)staged with
git status
Also, there should be a context option (or something like that) in your gui, that provides status.
Extra: Additional git resource (quite good imo) http://progit.org/
From Git-GUI select all files in the "Unstaged changes" list and select "Commit->Stage to commit" in the menu.
If you're not afraid of the command line, try this tutorial instead. It's a detailed walkthrough of beginning git in 10 parts and ends with a Git reference card to help you go further. The free Pro Git book is also much applauded.

Disable warning that solution is not under source control?

Shamefully, we use TFS at work for a C# project. I wish we could move to svn or git, but we can't change that. All of us working on the project hate the automatic check-out "feature" of TFS, so we checked in our solution and project files as unbound from TFS.
Now, whenever we open the project, we get the following message:
The solution you have opened is under source control but not currently configured for integrated source control in Visual Studio. Would you like to bind this solution to source control now?
Is there a way to disable this message while keeping the solution unbound from the buggy and annoying integrated source control?
The message you reference has nothing to do with TFS, it has to do with integrated source control within Visual Studio. If you really want to get rid of this message, go to Tools->Options->Source Control and set your source control provider to "none."
Then, go and download the Team Foundation Power Tools and enable the shell access, and you'll be able to right click within Windows Explorer and check in from there. If you don't want to do that, you can do your check-ins from the TF.EXE command line.
But seriously, if you don't like the automatic check-out, then just turn that off. You have the option of having TFS automatically check out, prompt you for check out, or do nothing and leave the files in a read-only state until you explicitly check them out.
Another possibility could be to move to a 'git-tfs' combined solution. You would move your team to git, and sync with TFS on a regular basis. This way, only one person has to live with the TFS annoyances.
I have no experience with that, but apparently it has been tried before
If you like the svn/git model better, then I honestly wonder why you would want to turn off automatic checkout? You can configure VS to silently check out files on edit. This comes pretty close to the svn way of working, no?
Also, ensure that the TFS server is configured to allow multiple checkout on all text-based files, and you should be good to go. You can also install your own diff and merge tools (e.g. TortoiseDiff/TortoiseMerge) if you want.

Bazaar (bzr) integration with Visual Studio

What's the best way to use Bazaar (bzr) as the version control system in Visual Studio 2008?
The best I found is TortoiseBZR and the command-line - nothing integrated with VS.
I wouldn't even bother with TortoiseBZR; bzr is very easy to use from the command line.
BTW: The last time I tried it, TortoiseBZR used to lock up windows explorer while it went off to a remote repository to determine the status of files, not sure if it still does this ... ? See also this SO question.
There is no native integration to Visual Studio, but there is good GUI application, called Bazaar Explorer. It's the part of official standalone installer, and also can be installed separately as bzr plugin.
Old, I know, but since this shows up on the top for Google search, the best way to integrate is a combination of Visual Studio's External Tools, and tbzrcommand.exe and bzr.exe. You can set up things like Status to go to the output window, and things like Diff to go to the tbzrcommand GUI window.
(I'm assuming you've installed TortoiseBzr here.) Using these as examples, in VS open Tools->External Tools, then Add. For the program, browse to the Bazaar directory and select bzr.exe. Name the command Status. For arguments, type "status" (sans quotes). Select that the output should be directed to the vs output window, that the command should be terminated when complete. Open a simple file under code control and add a space somewhere and save, then under external tools, choose status to verify that it shows up as a pending commit action. (You can add these to their own menu later, once they work.)
Next, add another external command and name this Diff. For the program, browse to the Bazaar directory, and choose tbzrcommand.exe. For arguments, type "--command=diff --file=$(TargetPath)" (sans quotes). Leave the options all unchecked. Then, for the file above that you added a space, select it in the solution explorer window and choose Tools->Diff. A TortoiseBzr window should appear (along with an annoying DOS window), and show differences between the working version and the latest commit version of the file.
For something like a commit, which requires a comment, you'll have to put in arguments like "commit -m " (sans quotes) and check the box to prompt for arguments (to allow the entry of a message for the commit).
There's a project in Launchpad, but it looks like it's abandoned, and when I downloaded it, I couldn't get it to build.
This is something I'm interested in myself. Tracking adds, drops and renames automatically in an IDE is the way to go. Seeing status is nice too.
If you don't need the SCC integration, just the ability to use the tool, try the setup in this article:
http://www.codeproject.com/KB/macros/Bazaar4VS.aspx
I've ported VisualHG to work with Bazaar:
https://launchpad.net/visualbzr
It's currently an alpha version, and has only been built and tested for Visual Studio 2010, but common operations should work OK.
Edit:
This plugin hasn't moved on much, but it does now support Visual Studio 2012.
Unified SCC has support for bzr. It is commercial but claims to be free for OSS projects.
UnifiedSCC
I too was trying to use this, and found that visual studio has an option of "External Tools", which can be found under the tools tool bar. Upon trial, I found that one could create a link to the bzr.exe (or any other exe tools you may want to use). Then, it asks for arguements. It is here where you can begin to use magic.
For me, to commit changes directly, I have created an arguement of commit -m "", which commits without message to the bzr branch if one exists in the working directory (to achieve this, you also have to change the starting directory to solution directory).
I also created a push command to my launchpad using similar idealogy

Resources