Visual Studio 2017 and Git Clone - visual-studio-2017

This is driving me crazy. We are using a local installation of gitlab and I'm trying to create a new remote repository from Visual Studio, for a new solution.
If I try creating the solution first, then Git clone, it complains the folder is not empty.
If I empty the folder and clone the repository, works, but then I cannot create the solution because it complains the folder is not empty.
So how the heck I am supposed to create a new clone for a new solution?! The remote repository has only readme.md file in it.

I had the same issue, and I found the same workaround (git clone empty repository, copy .git folder to my app folder, then sync).
Lately, I found that it's much simpler:
open your solution in VS
select "add to source control" (bottom right corner), then select "git"
a local .git folder is created, VS also populates .gitignore and .gitattributes, and commits.
now, you can notice that Team Explorer page shows a "Publish Git Repo" button, press it
enter an URL pointing to a non-existent git repo, e.g. "https://gitlab.com/full/path/to/myproject.git"
press "Publish" button
that's all.
Obviously, you must have installed GitLab extension for visual studio, before.
HTH.

Related

I deploy project on GITHUB pages not appear on browser

I deploy an angular project on GitHub successfully but when I click on the link of the project documentation appear instead of project How can I open the project on browser. the link of the project is https://khaledelmasry247.github.io/myNote/
This is Jekyll that runs by default on GitHub Pages.
You can disable it by adding the file .nojekyll in the root of your project.
More here:
https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/
I have faced the similar issue long back with my repository. You can check these steps:
navigate to repository
Go to settings of your repository
In the options section, navgate to github pages.
In the source select "root" as shown below.
Then check it once.
In order for GitHub pages to work with your project, you will need to build the angular project and push the built artifacts to your repository. You will also need to tell GitHub which directory to look at for your built files. It will look for index.html by default. Looking at your repo, it looks like you have already built your project and the files are in your gh-pages branch. You will need to do something like #KushalSeth suggests, except in your instance, you will have to change it to look at the gh-pages branch.
Click on the Settings for your project.
Scroll down to the GitHub Pages section.
Change the branch to your gh-pages branch.
Save.

GitHub repository created but unable to upload VS solution

I tried uploading a C++ project from Visual Studio 2019 onto my GitHub account.
The repository gets created when I do this however, none of my codes gets uploaded onto the repository.
Only the files ".gitattributes" and ".gitignore" appear in my repository.
Please could I have any suggestions on what I could do to fix this.
Close VS
Go to your local repository folder (the solution folder)
This will add all the files and commit them
git add .
git commit -m 'added files'
alternatively you can use "git add ___" to add one file at a time
Make sure you commit the changes and then do
"git push"
Re-open VS and everything should be setup now.
Here are some other instructions I wrote down recently which you may find helpful:
How to create a git repo from an ungitted local project already in development:
Create a empty repo on your repo hosting site
Go to your local project folder in git command line
git init
git add .
git commit -m 'message'
git remote add origin https://yourreposite.com/username/repo
git push -u origin master
Now you can open it in Visual Studio and everything is all setup

What is the .idea folder?

When I create a project in JetBrains WebStorm, a folder called .idea gets created. Is it okay if I delete it? Will it affect my project?
When you use the IntelliJ IDE, all the project-specific settings for the project are stored under the .idea folder.
Project settings are stored with each specific project as a set of xml
files under the .idea folder. If you specify the default project
settings, these settings will be automatically used for each newly
created project.
Check this documentation for the IDE settings and here is their recommendation on Source Control and an example .gitignore file.
Note: If you are using git or some version control system, you might want to set this folder "ignore".
Example - for git, add this directory to .gitignore. This way, the application is not IDE-specific.
There is no problem in deleting this. It's not only the WebStorm IDE creating this file, but also PhpStorm and all other of JetBrains' IDEs.
It is safe to delete it but if your project is from GitLab or GitHub then you will see a warning.
As of year 2020, JetBrains suggests to commit the .idea folder.
The JetBrains IDEs (webstorm, intellij, android studio, pycharm, clion, etc.) automatically add that folder to your git repository (if there's one).
Inside the folder .idea, has been already created a .gitignore, updated by the IDE itself to avoid to commit user related settings that may contains privacy/password data.
It is safe (and usually useful) to commit the .idea folder.
It contains your local IntelliJ IDE configs. I recommend adding this folder to your .gitignore file:
# intellij configs
.idea/
The reason my device was not being recognized was because my emulator was frozen.
What helped me was to wipe my emulator's data.
Android Emulator freezes
Checkout #gimme-the-411 's comment on this thread.

c:\ınetpub\wwwroot\mysite\website\sitecore\shell\override is invalid

I install sitecore 6.4 but after login i take this error
The directory name c:\ınetpub\wwwroot\mysite\website\sitecore\shell\override is invalid.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
I uninstall sitecore and install again but result same. Someone can help me pls.
By default this folder is not created when you create a fresh install of Sitecore. Have had this many times, and essentially you must manually create the folder, and also ensure the app pool identity has write permissions to this folder. If you have your Visual Studio solution open, also close and reopen as the change will not be picked up if you are running webdev.
I ran into this problem as well. My problem was i had my project committed on Git and I was trying to pull files from GIT to my local to setup the project.
The problem with GIT is that it doesnt commit empty folders so \website\sitecore\shell\override was not committed to the repo, and when i pulled, the folder didnt existed on my local as well.
Creating the folder manually resolved the issue.
As mentioned by #pranav-shah, git doesn't support adding empty folders so if you are using git and you are doing clean builds it is likely you are running into this problem.
To get around it you can just create an empty file in the override folder. I recommend following the suggestion in this answer and call it .keep
Whenever I run into this, it's the app pool identity missing write permissions to the folder. Often applies to following folders too, under the sitecore directory:
* shell\controls\debug
* shell\applications\debug
(I think there's one more but too tired to remember right now).
If you run the installer it normally takes care of these issues. Also be sure to read the manual installation steps in the Sitecore documentation, available on the Sitecore Developer Network.

How do clone a Mercurial repository into a directory that already exists?

I have a client's Django project that I'm developing locally, using Mercurial for version control. I push my local repository to my personal remote server (where I keep all my projects) and then when I come to deploy it (on whichever web server) I clone that respository there from my personal server.
This works fine on most servers (where I have total control) but I have a few projects where I'm deploying on to WebFaction. WebFaction is great, but a little unusual with it's setup, as I need to first declare the Django project as an 'application' through their control panel. This creates a few things automatically, such as an 'apache2', 'myproject', etc folder. It's this same folder though where I want to clone the repository from my personal remote server. Doing the usual hg clone command just doesn't work though as it says the destination folder already exists. There isn't much I can do about the contents of this folder really, so I need to work around this.
I'm not an expert at Mercurial and the only way I could seem to work it out is clone it to another folder and then moving all the contents (including the .hg) into the actual folder I want. This seems silly though...
I'm using Mercurial v1.6.2 (installed through easy_install). Could anyone share some light on this?
Many thanks.
Copying just the .hg dir definitely works, but you could also do a hg init and then hg pull http://remote/repo. A repo that has just been initalized has only the 000000000000000 changeset, so you can pull from any repo without getting the "unrelated repos" warning. This is essentially the same as hg clone --pull with a manual init.
You can copy just the .hg folder, then revert or update to tip. E.g.:
cp -a src/.hg dest/
cd dest
hg up -C
you can either move the folder after the fact, or you can just make a symlink to it. my webfaction directory is actually symlinked, so i know it works fine.
In the main, it looks like you might be trying to use Mercurial as an installation manager which is certainly not its design goal.
If I am reading you correctly, part of your source repository should be something like make deploy which puts the files into their proper places. Put another way, having a repository clone (in .hg) in your deployment directory seems odd and trouble-prone.