Sublime Forum

Git integration

#1

New user and liking what I see so far.

I’m trying to get the git integration going. My understanding is that some integration is built in to ST and more is available if you have Sublime Merge installed.

I created a local repository on my hard drive (in a different folder= which I plan to use for an existing project which has files in place.

I open the folder containing the project files in ST but none of the features described in the docs appear. I’m assuming this is because ST doesn’t yet know where my local repository is but I cannot find any way to provide that information within ST.

Thanks for any help you can provide.

0 Likes

#2

Git repositories are deduced from the folders you have added in the side bar. If you have not initialized a repository for those folders then there is not git integration (as there’s no git repo to integrate with). Use either Sublime Merge or the command line to initialize a repository and the git integrations will activate.

0 Likes

#3

I have initialized a repository, but it’s not in the same folder as the project files and if I open it inSublime Text, it opens in a separate editor window, not the same window as the project folder.

0 Likes

#4

If you have initialised a git repository at, for example, /foo/bar, you will need to have /foo/bar or any of its subfolders added to the side bar in Sublime Text.

1 Like

#5

As mentioned, I could not open the repository and the source code folder in the same ST window, they opened in separate window.

I managed to open them in the same window by adding the two folders to a project so now I have the repository and the source code folder open in the same ST sidebar but still no git interface options except when right clicking the the repository folder, there is an option to open the repository which starts ST Merge with the repo listed.

I’m thinking the issue is that I initialized a rep (meaning I created it with ST Merge) but I have not committed any of the pre-existing source code folder files to it. I know this is more of a git question than ST but how can I get the initial versions of the source code files into the repo? There are no options to commit them from within either ST or ST Merge?

0 Likes

#6

I got it all figured out now, thanks for your help.

0 Likes