I'm gearing up to upgrade from dotnet 4.8 to dotnet 6. I create a new azure repo, so I need to get all the folders/files from the source repo into the newly created repo. Is there a way to quickly transfer files? I looked around but I'm seeing just TFS to azure repo or local to azure repo.
Clone the Net4.8 repo onto your local drive
Clone the Net6 repo onto your local drive
On your local drive copy all the files except the .git folder from the Net4.8 folder to the Net6 folder
In the Net6 folder git add commit and push
Related
My azure repos contains all the folders , and changes will be made by the users in the azure repos.
I want to create CI CD pipeline in azure repos to integrate azure repos and the linux server. Whenever some changes done in the azure repos should reflect in the linux server.
I want to know, how to implement the above scenerio.
According to your description, you can try to install a new self-hosted agent in your Linux server.
And then in your CI pipeline, you can use the git clone command to clone the repo in your Linux server.
You can also use the copy files task to copy the folder of the repo the to the UNC path.
I can't find this topic in the documentation. I'm trying to upload a folder of files to GitLab - i.e. the file containing the entire webpage, (HTML files, assets, JS, etc.) In other words, I want to upload my entire repo to GitLab.
But, I only see the option to upload a single file at a time:
How can I upload a folder of files?
Folder upload is not supported as far as I know.
You could clone the project locally (blue button) creating a local repository and move/cope the folder to your local git-repository.
Then you just git add, git commit and git push everything.
Step by step:
Stage everything in git repo:
git add -A The parameter "-A" stands for "all", it will add every file and folder (apart for empty folders) that are in the repository to the commit.
git commit -m 'your message' will commit all your files/changes locally.
git push will upload your commits so that you can see them on your GitLab page.
I have been tasked to move a repository from Azure Devops to a Bitbucket server. I'm very new to Azure Devops. When I went to my repository in Azure, I noticed that I can download the repo as a zip file but there were no options to clone. I downloaded the zip file and when I tried to unzip the file, I got the following message:
unzip: can't find file table
The unzip process won't complete successfully. Will somebody explain to me why I cannot unzip a file from Azure Devops or tell me why the 'clone' option is missing?
As Daniel Mann said in the comment, there is no clone button in tfvc repo.
To get a copy of the source code ,besides using tf.exe, you can also map a worksapce through visual studio. You can map your source control folder to a single local folder.
You can refer to this document.
In addition ,download code repo to a zip file and import it to the new domain is also a way. I tested the downloading as zip and it can be successfully unzip with 7-Zip.
I setup a git server on Debian and created a folder called git in /srv/git/.
Inside the folder, I'd like to divide my git projects by cloud hosted cloud and on-prem hosted on-prem. Inside of these two folders contain the hostname and it's specific files needed for deployment, redeployment, etc.
So a server that does apache on the cloud with a hostname like webapp will have a folder structure like /srv/git/repos/cloud/webapp.
Should the command git init be ran from the cloud folder or webapp folder?
I presume your setting up the bare repo.
As you mentioned in the question, you want to have separate git projects plural here so what I understood is you want to have more than one project under cloud directory.
Method 1:
cloud
|------->webapp
|------->something1
|------->something2
Very straight way is doing /srv/git/repos/cloud/webapp.git here webapp is the git repo.
Setting up the webapp as git repo.
git init --bare /srv/git/repos/cloud/webapp.git
--bare: for the bare repo you can skip this using on exisiting repo.
Though init is not harmful to give on existing repository is safe. It will not overwrite things that are already there
Method 2:
cloud (git repo)
|------->webapp (submodule)
|------->something1 (submodule)
|------->something2 (submodule)
In another option where you can keep cloud as git repo and make webapp as submodule. That is repo inside the git repo.
You can choose what fits to you best.
I suggest to use two different repo, if your have plenty of submodules in one git repo it might be cumbersome at the start to keep track of things.
The answer to your question is that you should run git init from the cloud folder, giving webapp as the first argument, i.e. git init webapp.
That said, you could also create the webapp directory, change into it, and then run git: mkdir webapp; cd webapp; git init; The end result will be exactly the same, but why bother?.
I duplicated a local copy of an Android project on my PC from File Explorer. This project was already uploaded onto GitHub successfully. I believe I followed the steps to rename/refactor the copy to a new name. The package name and app name all display the new name I want.
However, when I attempt to share it back on GitHub, it says it already exists (displaying the previous app name).
Not sure how to get my local, renamed version back on Github as a new project and not overwriting the previously named version.
find a hidden folder inside your project, having name .git delete it and then share your project to github.
There is config file inside .git folder, may be that having address of your remote git project.
There is no need to delete the .git folder: that would lose the history!
Simply create an empty GitHub repo, and on your local copy, do
cd /path/to/local/copy
git remote set-url origin /url/new/empty/github/repo
git push --mirror
You don't have to rename the parent folder of your local copy, or rename anything: just make sure its default remote upstream repo "origin" references now your GitHub repo.