how to migrate git to gitlab migration with history (existing branches and tags) - gitlab-omnibus

I setup the new fresh GitLab server and i want to migrate my git repositories to gitlab server. I am following below steps but i am getting the error.
git clone --mirror Git repo URL
git remote add NEW-REMOTE Git Lab repo URL
git push NEW-REMOTE --mirror
finally it through an error
remote: fatal: Error in object
error: pack-objects died of signal 13
any help would be appreciated.

I believe gitlab has it's own git import tool built into the interface. When creating a new project you can import an existing git repo with it. Any history and branches will be included.
screenshot:

Related

Uploading Files from Laravel App to BitBucket

Here is what im try to achieve, I have a laravel app with a BitBucket repo in my laravel project public directory (public/repo.name).
Now what i want is to run, git add . git commit -m "Changes" and git push from my (public/repo.name) directory inside my laravel app.
I want the git commands to run when i go to lets say, http://127.0.0.1:8000/deploy this would only deploy whatever changes are in (public/repo.name)
Convert your Project to a Git Project
Open your terminal and navigate to the project root directory and run the git init command.
git init
git-init-laravel-project
Git init Laravel project
Git Add and Commit All Files
With the git init command we have successfully converted our project into a local git project. Although we have not yet added a git remote to our project.
As a second step lets go ahead and add and commit all the files to our local git repository.
Run the git add and git commit command on the project root.
git add .
git commit -m "First Commit"
The git add command adds a change in the working directory to the staging area. It tells Git that you want to include updates to a particular file in the next commit.
The git commit command commits the staged snapshot to the project history. Committed snapshots can be thought of as “safe” versions of a project—Git will never change them unless you explicitly ask it to.
Git add and Git commit on Laravel project
Create a New BitBucket Repository
We are now ready to push our changes to a remote repository. But before that we have to create a repository where we can push our changes.
Login to Bitbucket if you already have an account or SignUp for a new account. On the left hand menu , Click on the + symbol to get the option of Creating a New Repository.
Create Bitbucket empty Repo for Laravel.
Enter a suitable project name and click on Create Repository. A blank repository will be created and you will be redirected to the overview page of the repo.
Now we can go ahead and make this repo our remote repo for the Laravel project.
Add Remote Repo and Push Changes
To add the repository you just created as the remote repo for your local Laravel project. Run the following command on your project root in terminal.
git remote add origin https://<repo_owner>#bitbucket.org/<accountname>/<reponame>.git
Replace the repo_owner and accountname in the URL accordingly.
git-laravel-remote-add
git remote add laravel
Now we can go ahead and push the changes to remote repository.
git push -u origin master
git-laravel-push-bitbucket
Git push Laravel project
If you see at source in your bitbucket repository. You should see your Laravel directory structure along with the files.

Why do am i getting error 404 on my sub module symlink found on my git repo?

I'm currently having an issue with my git submodule. I've created a git submodule in my cloned project folder and it appears right on my repo. But when I click on the symlink, it gives me Error 404 page not found. I am VS Code and Windows 8 x64. Thanks a lot for your help! Below is what is written in the .gitmodules
[submodule "themes/casper-two"]
path = themes/casper-two
url = "https://github.com/eueung/hugo-casper-two"
I cannot find the caa182b commit in the hugo-casper-two repository, so I believe you need to update the submodule to the latest commit available. To do this, run the following command from your project directory:
git submodule foreach git pull origin master
This command will update every submodule in your project and pull the latest commit from their master branch.
Remember to commit your own repository afterwards.
git commit -am "Pulled down updates to submodules"

clone a fork project in bitbucket

I am new to bitbucket. I am reading bitbucket documentation to learn it. I am at the fork concept. In fork documentation they provide a tutorial how to clone fork repository to my local machine. The tutorial is using the TortoiseHG Workbench. I have forked the external repo to my repo. Now I want to clone my fork repository using git bash because I already clone a git repo. I am unable to clone a fork repo using bit bash. Is fork repo only cloned using TortoiseHG Workbench or there is also a command for cloning.
I am using these commands for cloning my fork repo.
git clone git#bitbucket.org:user/myqoute.git
the error is
conq: not a git repository.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
First, you need to fork (meaning make a clone on the BitBucket side) a Git repository, not a mercurial one like tutorials/tutorials.bitbucket.org.
Use for instance tutorials/online-edit-starter.
Then you can clone that fork with:
git clone https://bitbucket.org/yourUserName/online-edit-starter.git
(using yours BitBucket credentials: username and passwords)
Or:
git clone git#bitbucket.org:yourUserName/online-edit-starter.git
(provided you registered your public ssh key in that repo)
How to clone Repository ? (proposed by Rajesh Chaubey)
First take of fork repository:
git clone https://rajeshchaubey87#bitbucket.org/rajeshchaubey87/uispark.git
(copy your repository url.)
(then go to your master folder).
cd uispark
git remote add upstream https://animatorstar#bitbucket.org/animatorstar/uispark.git
git fetch upstream
git merge upstream/master
git remote -v
git status
git add -A
git commit -m "your comment here"

git: export from bitbucket and import github (w/ commits)

I created a private git repo on bitbucket and committed code.
Now I want to export all (commits, code, history) and import it in a git repo on github.
Is there a way to do this?
Thanks
Check everything out locally to your computer and git pull.
Create a github repo
Add this repo as your second remote ("with git remote add github URL")
Push to the second remote

How to Set Up Xcode with Remote Git Repository

so I just installed a new remote git repository on one of our servers and want to move our old projects there. Our existing projects have local git repositories, and we can add repos from the server, but how do we move our existing projects onto the server?
Any ideas?
You would do these steps:
Make the individual repositories on the server.
git clone --bare nameofrepo
On the actual repo, add the remote to the repository from which you want to send up work:
git remote add origin <url to your remote>
Now push your branch for your work:
git push origin master
Repeat for any other branches you want to have pushed to the central repo.
The URL in the first command can also be a regular file path. Most solutions, however are through an SSH connection.
After creating your Xcode project, cd to that directory
and make sure you are on the master branch
Type:
git remote add origin <URL-of-your-GitHub-repository>
git pull
git branch --set-upstream-to=origin/master master
git merge
git commit -m "Merging with remote”
git push
Now your new project has been pushed to the remote GitHub directory.

Resources