Would like to use VSTS Git repository with TortoiseSVN or any other open source client for source control. I will not going to use VS SDK for my project files as all of them are static HTML files but I really want to push files to Git on VSTS.
TortoiseSVN is the tool for SVN (not Git) client source control system.
It's ok use any GUIs to connect with VSTS git repo instead of using VS.
Such as you can use TortoiseGit, SourceTree etc to connect with VSTS git repo.
Related
I have a big .NET solution with many projects. Everything is on Azure devops, and working well for the team.
Some of these projects are demo project.
I would like a way to publish the code of these demo projects on github, so they will be publicly available.
I'm looking for a way to publish the code of these specific projects to github.
Does anyone have a way to do that efficiently ?
if you are using any previous source control (ex TFS) first Unattache it ,
i presume you are using VS,
right click the solution then select "Add solution to source control "
since VS 2015 , GitHub is integrated out of the box , log in to your GitHub account(if you are using an older version just download it as an extension )
Below are the visuals
Create a new folder.
Copy to this folder only the projects you want to publish on GitHub.
Create a new Git repo:
git init
git add .
git commit -m "first commit"
Create a new repo on GitHub:
Open cmd and push the new local repo to new GitHub repo.
cd path/to/your-new-folder
git remote add origin https://github.com/{your-user-name}/demo-projcets.git
git push -u origin master
We are using one of the project from Github. We need to check-in code of this project in our TFS.
We need to automate this process. Else everyday we need to download the code and then check-in.
Is there some plugin or some tool to automate this?
If you are using a TFVC repository in TFS then you'll probably want to build some scripts and a process around Git-TF to help automate some of this work.
If you are using a Git repository in TFS then you can create set up two remotes in a local Git repository, i.e
git remote add upstream https://github.com/foo/bar.git
git remote add origin https://tfsserver/DefaultCollection/_git/bar
And then simply do a git pull upstream master followed by a git push origin master assuming that master is the branch that you want to keep in sync.
With either version control system, you probably want to keep a branch in version control in your TFS repository to match what is in your upstream GitHub project so that you can easily see change coming in the one place and then handle your merges inside your local repository.
I'm new to git and github and I have a question about the git plugin for eclipse Egit.
I have made a clone from my github repository to a remote server (other than github) which I will call 'rserver' for the ease. Now I am editing the files in my repository on 'rserver' locally from my computer with eclipse (and the RSE plugin) but when I want to do any git actions like committing the changes I made, I do that directly on the 'rserver' (command line). Now I would like to be able to commit changes etc. with eclipse and (what I presume to be the best option) the egit plugin. Since all code needs to remain on the 'rserver' to be functional as a program, there is no point of making another local clone of my github repository. But all options I've tried with egit seem to do exactly that.
Is it possible to manage all git actions between 'rserver' and github from my local Eclipse SDK (other then using the terminal in eclipse)? And if so, then how?
git clones repos, meaning they contain the same objects.
I don't think there's a way to work on a remote repo, but you should git clone your rserver repository locally, work and commit there (this using eclipse), and when you want to upload your code to rserver or github, you just push your changes there.
When you git push, you make the remote branch point to the same commit your local branch points, uploading any remote-missing object.
Probably you will want to add both remote repostiories (rserver and github) as remotes of your local repository, so then you can decide to whether of both to push changes to.
There is much value in being able to edit files remotely and there is much value in being able to version control your files in git. Currently I have the same situation. My "rserver" however, is a Puppet master. I'm editing the files through RSE on the Puppet master with my local PC in Eclipse. There's a lot of value in editing the files directly on the Puppet master, trying out the change and if it doesn't work continuing to modify the files. Having to then ssh into the server just to do git actions is dumb. Having a local git clone that you have to git add, commit, push, then go to the server and git pull is even more dumb. Eclipse should allow you to do git actions through RSE.
Is there any way to use git-svn from within Netbeans. I'm currently working on a project that uses svn, and I'd like to at least use git locally.
NetBeans currently does not support git-svn. You still may use NetBeans for local Git repository, but you have to run git svn rebase and git svn dcommit yourself.
Another option is to use SubGit on a server-side:
Install SubGit into your Subversion repository, see documentation.
Setup remote access to created Git repository, e.g. using git-http-backend.
After that you may clone that Git repository via NetBeans and work with it as with usual Git repository.
On every push SubGit automatically converts your Git commits into Subversion revisions.
When someone commits changes to your Subversion repository, SubGit automatically converts them into new Git commits. So, you get them with a normal pull.
Hope that helps.
I'm thinking about migrating a project from Sourceforge to Github. Besides the svn to git, what about migrating things like the issue tracker? Is there an easy way to do that?
For SVN to GitHub part, this is now the easiest way: https://help.github.com/en/github/importing-your-projects-to-github/importing-a-repository-with-github-importer
But it doesn't import issues.
I've written a Python script to migrate issues. It's at https://github.com/ttencate/sf2github.
Beware: Sunday afternoon software. Use at your own risk, etc. etc. Pull requests welcome!
since I just have done this here is my approach
create a local git repository from the remote svn repository
git svn clone http://svn/repo/here/trunk
now push the repository to github
git remote rename origin upstream
git remote add origin git#github.com:myname/myproject.git
git push origin master
This script uses rsync to sync the raw svn repo onto your /tmp directory and requires the svn2git ruby gem for importing the svn commit info into git.
If you happen to use a newer version of the SVN infrastructure provided by sourceforge (aka SVN 2.0 dev), you can use this script instead - I forked off the original to just make changes to the rsync command. :)