I've already trying to set gitlab few days with SourceTree , you can explain it step by step? I can not find the solution.
Bye and thanks!
It is pretty straight forward.
Go to File -> New / Clone and it'll bring to the front the SourceTree repo info where you can add new repos.
Click New Repository and then Clone from URL
Enter the URL of your GitLab repository, and below it the location where you want to save this repo on your computer and name of the repository if you want to name it differently.
A window will popup asking ask you for your GitLab username and password
And that's it. The GitLab repo will be cloned.
In case you are wondering where you get your project's URL on GitLab, it looks like this on GitLab when you click on your project:
Related
So I have a public repository from my lecturer on GitLab, which I cloned into intellij via "import VCS" (https Link). Now I want to always push into my own repository in GitLab and not the public repository. How can i do this in intellij or where else can I set this up?
I already tried to copy the project into a new project and push seperately but this isnt a good solution because then i need to copy everything manually whenever new things are being added in the public repository and i cant just pull from the public repository.
The optimal solution would be, that i can pull from the public repository but push my commits into my own repository in GitLab
clone the public repository using command
git clone repo_path
git add .
git commit -m "comment"
git push origin main
You can clone your lecturer project.
Once it's done, go to Git | Manage remotes and add your private repostiory there.
Once it is added there, when you decide to Push -> go to Git | Push and then you can click on origin and choose desired remote. This way you can choose your target remote and update your local project from your teacher's repository.
I'm a coding newbie, so this may be sort of a dumb question. I was working on an SQL project to learn the language and I wanted to know if there was a way to download and execute a Github repository, I haven't used Github before. Thanks!
If you are a newbie, I think you should learn how to use git.
You can refer the link below: https://education.github.com/git-cheat-sheet-education.pdf
Basic steps:
Clone or download source code from Github.
You can download it directly, or use a tool like Git-bash, tortoise git...
Run this source code, depending on the language of the source code.
In order to run any code in a Github repository, you will need to either download it or clone it to your machine. Click the green "clone or download repository" button on the top right of the repository. In order to clone, you will need to have git installed on your computer. Then, follow these instructions. You could also just click download. Once you have it on your machine, how you run the code will depend on what type of code your project is written in.
I'm assuming that you found a repository relating to SQL on Github that you want to run, the best thing to do is to scroll down and read about that repository I'm sure most of the time there are instructions there on how to install or run the repo and from there if you don't understand something try Googling that keyword I'm sure Google has an answer for that and also best way to learn.
If you use codesandbox you can import and export from it to github. So, when you go to codesandbox, the very left bar, click on the rocket (deployments) and deploy to Github (pages). But I'm sure there must be a way to also do it from github via github actions, but I couldn't figure out either
You cannot directly run the code because it only can run based on specific environments like using python. Instead of using git to clone the code, you could download the code zip file through the code button on the github project.
Step 1:
Open GitHub and navigate to the main page of the repository.
Step 2:
Under the repository name, click on Clone or download.
Step 3:
Select the Clone with HTTPs section and copy the clone URL for the repository. For the empty repository, you can copy the repository page URL from your browser.
Now just go to your Ide(editor) and open terminal just enter the below command, click to Enter.
command : git clone [url]
$example -> "git clone https://github.com/ImDwivedi1/Git-Example.git"
Now you can see folder has been created in your directory.
I have been unable to find how to rename a local repo in GitKraken, or if this feature is unavailable.
I believe the option was available if you use the Init feature to generate the local and remote repos, but I'm wanting to update the repo name after it's already been set up and used.
(I set up my remote repo on BitBucket, then cloned my local repo in GitKraken, and it just uses the last folder name in the local path as the repo name.)
My recommendation would be to push everything you have to repo, then rename on the repository itself online, then re-clone from the new location as if it was a new repo.
This is the top result when searching for solutions to this issue.
In case anyone stumbles across this post, these days GitKraken has the ability (at least it does on macOS) to add aliases to existing repos which resolves this issue for me.
To add an alias, you first need to open the repo, then right-click the tab (in the tab bar at the top), and choose the "Alias repository" option. This will then allow you to define an alternative name for that particular repo.
A screenshot showing the open, tab context menu.
Happy aliasing! :)
I need to work on different branches of a project at the same time, so having multiple folders (one for each branch) would be the faster and easier solution.
The problem arises when cloning my own repo: GitHub for Windows will recognize it and automatically move it to the main repository, where i can manage only one branch at a time.
I'm new to GitHub and couldn't find any working solution/workaround for version 1.2.110
Already tried, didn't work:
Github: how to checkout my own repository
Clone Github repo to specific Windows folder?
https://stackoverflow.com/a/7803102/1193335
http://bitdrift.com/post/4534738938/fork-your-own-project-on-github
1 Create a new folder, eg: C:\GitHub\mynewbranch
2 Drag it into GitHub, fill the description fields, uncheck "Push to GitHub" and continue.
3 Open your "Repository settings":
And fill the "Primary remote (origin)" field with your repository url:
4 Click "Open in Git Shell" (below "Repository settings") and type this in the command line:
git remote set-url origin git#github.com:<username>/<repository name>.git
5 Then this:
git pull origin <branch name>
6 Switch to the desired branch in GitHub, enjoy :-)
P.S. to update future changes from the master:
git pull origin master
Is there a way to use Github and Unfuddle for the same repo? I am responsible for a repo hosted at Unfuddle, but I am not the main owner and it's private because it's part of an ongoing project. I still need to update the repo there when changes are made, but I would like to use the same set of files to create and update a public Github repo associated with my own account, is that possible? The reason I want to use the same files is that it's a WordPress plugin and it needs to be tested before I commit changes, therefore I need to use one set of files to not complicate the matter. Any help would be appreciated.
You can set up both the repositories as remotes and push/pull to and from both of them; Git is decentralized and thus doesn't really care about whether you have one remote or many.
http://www.kernel.org/pub/software/scm/git/docs/git-remote.html
Example:
git remote add github git#github.com:username/reponame.git
and then...
git push github <branchname>
git pull github
git log github/<branchname>
etc...
Create your github repository, then from your Unfuddle local repository, run:
git remote add github git#github.com:YourUsername/YourReponame.git
Where YourUsername is your github user name, and YourRepository is your repository name. After setting up the github repository, the above URL with the user name and repository name filled in, should appear on your github repository page anyway.
Everything works like you'd expect, for example, pushing:
git push github
Your settings for the Unfuddle repository will work like before.