How to migrate application source code from SVN to AWS CodeCommit - ios

I want to migrate iOS application source code from SVN to AWS CodeCommit.
I checked everywhere but haven't got proper information. Somewhere I got know that first need to migrate source code from SVN to GIT and then can able to migrate it on AWS Code Commit from GIT.
Need to confirm that is it correct information.

I just did it for my project via these steps.
Migrate project from svn to git using svn2git
Create an online project in a git repository for temporarily storing the project before moving to CodeCommit. I used gitlab.
Push the git project to the online repo
git remote add origin git#gitlab.com:corridor/project_name.git
git push origin --mirror
Follow https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-migrate-repository-existing.html to migrate git project from gitlab to CodeCommit

That is correct. AWS CodeCommit stores private Git repositories, and does not support SVN natively. Once you have a Git repository, you should be able to push to CodeCommit.
Also, maybe this doc can help you with the migration: https://git-scm.com/book/en/v2/Git-and-Other-Systems-Migrating-to-Git

Related

Azure DevOps - Moving TVCS Repo from one tenant to another - 2021

Before posting this question I have looked through all the similar ones. Finding no workable solution I am asking for help.
Thanks in advance!
I am trying to copy the repository from one tenant to another one using the following approach:
(done) Download the tool: Download Microsoft Git-TF for Visual Studio Team Foundation Server and Visual Studio Online from Official Microsoft Download Center
(done) Download Git-TF and Git-TFS (done with using git-tfs)
Clone an existing TFVC repo to my local machine as a Git repo using the Git-Tf tool: git-tf clone https://dev.azure.com/myorg/ "$/mysourceteamproject/mysourcebranch" --deep git-tf is no longer supported so I used git-tfs here. git-tfs clone https://dev.azure.com/myorg/ "$/mysourceteamproject/mysourcebranch" --deep
(done) Cd into the directory that the code was cloned into and push the local Git repo to any empty remote Git repo (this will be used as a temporary repo during the migration) git remote add origin https://user#dev.azure.com/myorg/anyteamproject/_git/tempgitrepo git push -u origin –all
(done with using git-tfs) Cloned the temporary Git repo to my local machine git-tfs clone https://user#dev.azure.com/myorg/anyteamproject/_git/tempgitrepo
(done ) Created an empty new folder “migrated” in the existing target TFVC repo (done with git-ft but from this step I am not sure it is a correct approach now) Cd into the directory that the code was cloned into, and run the configure command: git-tf configure https://dev.azure.com/myorg/ "$/mytargetteamproject/migrated" (here git-tf does not due to Basic Authentication issue as it is no longer supported. Using gif-tfs led to bootstrapping to the tenant we would like to copy from - to original )
Run the pull command to merge two repos does not work - git-tf pull leads to bootstrapping to the wrong tenant - git-tfs pull the steps below simply cannot be executed as the step 8 cannot be completed properly.
Run a basic git commit command git commit -a -m "merge commit"
Checkin to the TFVC repo git-tf checkin –deep --metadata
The question is - is there a way to move TVCS repo from one tenant to another TVCS tenant repo?
Finally, I managed - of cause not only me - to do migration.
Unfortunately, git-tfs could not be used as it works not as git-tf.
The main issue was Authorization step with using git-tf.
Using token name and token as user name and password accordingly helped a lot.
All the steps done can be seen below:
Install GIT, GIT-TF, Java
To clone source repository to local GIT
git-tf clone https://azerov:[source token]#dev.azure.com/OrganizationName "$/D365FOps_Learn02/Trunk" --deep
username: TestPatMigration (the name of the token)
password: [source token]
Create any remote GIT repository to push local cloned repo there
cd into cloned repo c:\users[curuser]\Trunk
git remote add origin
https://azerov:[git temporary target token]#dev.azure.com/OrganizationNameTarget/GitTemp02/_git/GitTemp02**
To push local cloned repo into temporary GIT repo
git push -u origin –-all
To clone temporary git repo to local machine
git clone https://azerov:[git temporary target token]#dev.azure.com/OrganizationNameTarget/GitTemp02/_git/GitTemp02
To configure the target TFVS Project to push local temporary GIT repo there
cd into c:\users\GitTemp2
git-tf configure https://azerov:[git temporary target token]#dev.azure.com/OrganizationNameTarget/ “$/D365FOps_learn02/Trunk”
git-tf pull
Username: PATMigration (the name of the target source token)
password: [git temporary target token]
git commit -a -m "merge commit"
git-tf checkin –-deep –-metadata

Git Version controls tutorial for Xcode projects

How to manage my Own project on server using Git version control.
Is there any tutorial for creating Server and adding project using Git commands.
I don't completely understand what you mean by creating server.
But if you mean creating a repository, then what you can do is go to one of the following websites and create a free account based on your need:
Github: https://github.com
Bitbucket: https://bitbucket.org
Now the above two have following features:
Github support unlimited free public respositories, and paid private repositories.
Bitbucket supports unlimited free private repositories.
You can start with creating a free account. Then go to your project repository root folder and execute the following commands in the same order:
for instance using bitbucket: -
git init
git remote add origin git#bitbucket.org:username/abc.git
echo "Anil Gupta" >> contributors.txt
git add contributors.txt
git commit -m "Initial commit with contributors"
git push -u origin master
Thereon you can follow this tutorial:
https://www.tutorialspoint.com/git/git_tutorial.pdf
Cheers!

Using Git-tf for iOS project

I want to use TFS as a version control for developing one of our iPad applications. I followed this article for configuring my Xcode project.
After doing all the steps mentioned in the blog i am able to checkin and checkout the whole project. But I am not able to push changed files back to TFS server. More over I am getting following error on executing git push command
fatal:
https://username#mydomain:8080/tfsprod/info/refs?service=git-receive-pack
not found: did you run git update-server-info on the server?
Any Help would be much appreciated.
Just moving the comments into an answer.
You can't use git push. You need to use either git tf checkin or git tf checkin --deep (if you want a check in per git commit).
Reference documentation for git tf checkin is here

Rails: Rubymine: GitHub

I can't seem to figure out how to commit my files to GitHub.
I am using RubyMine 4.5 on the MAC
I have git set up locally
I have a private account on GitHub
From the RubyMine Preferences, I have my GitHub credentials properly set up (and acknowledged as such by RubyMine), but it did not give me an option to select a repository on GitHub.
How do I commit file to the GitHub repository? There are too many CVS and Git menu items in RubyMine.
PS: I've read the online help sections (the only thing available to me), and I followed the instructions in the GitHub integration, but the directory I'm trying to commit is failing to push to GitHub, with RubyMine telling me that there was nothing to commit. This is the first time I use RubyMine for GitHub. Nothing about this on StackOverflow.
Okay, I think I've recreated your situation locally and it appears that RubyMine has terrible support for managing remotes. If you create a Git repository locally, then (separately) create a repository on GitHub, there's no obvious way to marry the two from within RubyMine.
Basically, you need to set up GitHub as a remote for your local repository from the shell, and once that's done then RubyMine will be able to push as normal.
Please note that the below instructions assume you want to overwrite your GitHub repository with the full history from your local repository -- If your GitHub repository has data that you do not want to lose, do not execute these commands! See Below.
Open up Terminal:
cd /path/to/my/project/root
git remote add origin https://github.com/yourusername/yourrepo.git
git push -u origin +master
Now, RubyMine should be able to push to your GitHub repository via VCS > Git > Push
If your GitHub repository has already been committed to and you don't want to lose those changes, you'll need to either create a new GitHub repo or clone your GitHub repo into another folder and merge your local repository into the clone.
This can be avoided entirely if you're trying to push your existing local repository to a new GitHub repo: Simply use the VCS > Import into Version Control > Share project on GitHub option and use the dialog to create a new GitHub repository.

Git + GitHub + Heroku

I am new to the world of Git, GitHub and Heroku. So far, I am enjoying this paradigm but coming from a background with SVN, things seems a bit complicated to me in the world of Git. I am facing a problem for which I am looking for a solution.
Scenario:
1. I have setup a new private project on GitHub. I forked the private project and now I have the following structure in my branch:
/project
/apps
/my-apps
/my-app-1
....
/my-app-2
....
/your-apps
/your-app-1
....
/your-app-2
....
/plugins
....
I can commit the code in my Fork on GitHub from my machine in any of the folders I want. Later on, these would be pulled into the master repository by the admin of the project.
2. For every individual application in the apps folder, I have setup an app on Heroku which is a Git Repo in itself where I push my changes when I am done with the user stories from my local machine. In short, every app in the apps folder is a Rails App hosted on Heroku.
Problem:
What I want is that when I push my changes into Heroku, they can be committed into my project fork on GitHub as well, so, it also has the latest code all the time.
The issue I see is that the code on Heroku is a Git Repo while the folders which I have on GitHub are part of a Repo.
So far, what I have researched is that there is something known as Submodule in the Git World which can come to the rescue, however, I have not been able to find some newbie instructions.
Can someone in the community be kind enough to share thoughts and help me to identify the solution of this problem?
The idea behind submodules is that they're all separate git repositories that you can include into a master one and rather instead of including all the files it includes a link to that submodule instead.
How to use submodules
To use a submodule, first you must extract out the directory and create it as its own git repository by using git init. Then you can upload this separately to Github or [place of your choosing] and to use it as a submodule use the command: git submodule add [place/to/put/it] git://github.com/you/proj1.
Separation is best
I would think it better to leave these separated out as their own git repositories and push to heroku from each one. The reason? It's more likely (I feel) that you're going to be working on one at a time and doing a git commit and git push heroku master for that one only.
If you wished however to deploy all applications at the same time you could recurse down the directory tree using this Ruby script placed in the top-level directory:
Dir["**/*"].select { |dir| File.directory?(dir) }.each do |f|
Dir.chdir(dir) do
`git push origin master`
`git push heroku master`
end
end
Of course this would only work if you have staged all your changes. I can't think of a way to automate that as Ruby <= 1.9 doesn't have the module to read your thoughts.

Resources