Uploading code in Gitorious - gitorious

I created an account in Gitorious and I want to upload code from my computer, but I don't know how to do it. Searching in internet I realized that I can't watch the menu to upload code from the dashboard.
I created the public SSH Key and I created a project and a repository. How can I upload the code from my computer?
Thanks.

The answer :
add new project and new repo on gitorious
on your local disc in program directory :
git init
git add .
git commit -m " name "
git remote add origin git#gitorious.org:my-project-name/my-git-repo.git
git push origin master
If you will have error :
fatal: remote origin already exists.
then :
git remote rm origin
git remote add origin git#gitorious.org:my-project-name/my-git-repo.git
git push origin master
It is based on :
faq - How do I point my local Git repository at Gitorious?
Creating a new git repository in Gitorious by kosmas
Getting started with Git and Gitorious by sagarun

Related

Push from Azure repository to cpanel private repository

I'm trying to find a way to use a pipeline to push the Azure repository to another repository on my cpanel server. At the moment I'm just transfering the files over FTP but I need a proper push to activate autodeploy on cpanel repo.
Many thanks to anyone that can help.
This process would be the same the way to commit changes to a git repository.
Initialize a git repository add the data in the staging area commit changes to local git repository then push the changes to remote git repository. The process isn't different from the normal local machine one.
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin <azure repo url >
git push -u origin main

Bitbucket git issue on Linux

I am very new to bitbucket and linux. I am trying to upload files from my local to bitbucket. I tried the following command:
git commit -m 'commit to master'
git push -u origin 'master'
Then I got an error like
fatal: 'origin' does not appear to be a git repository fatal: Could
not read from remote repository.
Please make sure you have the correct access rights and the repository
exists.
Then I tried
git remote add origin ssh://mjsofttechindia#bitbucket.org:mjsofttechindia/project.git
git push origin master
Then I got an error like
ssh: Could not resolve hostname
bitbucket.org:yourname: Name or service not known fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Please help. I don't know if this is correct or not. Please help me.
Change remote url to
ssh://mjsofttechindia#bitbucket.org/mjsofttechindia/project.git
git remote set-url origin ssh://mjsofttechindia#bitbucket.org/mjsofttechindia/project.git
Then you have to configure your name and email address (the one that you created your Bitbucket account with) in your local repository
git config user.name "Your Name"
git config user.email "you#email.com"
Then do a push again
git push -u origin master

How do i add and sync my local git on server? What is bare repo?

I am using git from a long time but never set it up on server. Refereeing to this Git: move existing repository from PC to server, clone from server
I have initiate a bare repo on server but while adding origin in local
"git remote add origin server:path/to/repo" i have no idea what to add here. My site is getwalkwel.com and user is getwamld
Thanks
Origin is the name of a remote which is typically created automatically when you clone a repo from another repo. The origin reference in the cloned repo will be created to point back to the repo that was cloned from.
In your case, where the bare repo was actually created later from your working repo, you will create origin in your working repo to point back to your new bare repo.
This is done with:
git remote add origin /barerepo/fullname
If your bare repo is going to line on a different machine, then you need the URL to reach the repo instead of just a file path.
For instance, you might have myuser#myserver:path/to/repo
Bare repository in Git is a repository which only contains version control information only in fact this will not have .git sub-directory or any working files.
This kind of repository is helpful when you need to share or divide your work between few people for example in work environment you and your team mates are working on same project and you all need to see changes and all needs to do push to repository in this case this repository is more useful.
You can add the remote repository to local git repo
$ git remote add origin ssh://myserver.com/var/git/myapp.git
pushing to remote repository:
to push our local master branch to the origin's master branch. You can do that using the git push <target> <local> command.
$ git push origin master
click here for more information on how this works

Add bitbucket repository to heroku project

I set-up a heroku Node project. Everything works fine but I would like to be able to push also on my bibucket repository. Git is set-up for Herokuy but when I try to add the bitbucket repository with the command:
cd /path/to/my/repo
git remote add origin git#bitbucket.org:MYUSERNAME_/PROJECTNAME.git
I get the following error:
fatal: remote origin already exists.
So I tried to run the command
git push origin master
And I get the response:
Username for 'https://github.com':
How can I push both in heroku and on my bitbucket repository?
You already have an origin repo defined (as github) so if you have the git project in bitbucket so you just need to reference as a new repo
git remote add bitbucket git#bitbucket.org:MYUSERNAME_/PROJECTNAME.git
then you will be able to run
git push bitbucket master (or any branch you have defined)
If you do not want to use github anymore and replace your origin repo with bitbucket, do
git remote set-url origin git#bitbucket.org:MYUSERNAME_/PROJECTNAME.git
and then
git push origin master
will push to your bitbucket repo - make sure to follow heroku instructions to add the heroku repo and push your files there to be deployed
Deendayal Garg gave me the right hint: with:
git remote -v
I could see that I had the original repository as origin remote. I deleted that, I unshallowed it (because the original repository was cloned with the -depth option) and I finally could add my personal bitbuket remote!

Undo user delation and removal of his project

In our own Gitlab server, I accidentally removed the default admin, and the previous repo created by this default admin, is also gone.
How to recover the missing repo?
Following merlin2011's suggestion, I finally cloned my local copy to the gitlab server:
git remote -v // list all remote repo
git add repo 192.168.1.xxx //our local git server
git push -u repo master
git remote remove repo
git add origin 192.168.1.xxx

Resources