2018-10-22         Albert

How to change commit message after pushed to remote in Git

This question already has an answer here: Changing git commit message after push (given that no one pulled from remote) 11 answers Accidentally pushed commit: change git commit message 4 answers git commit --amendWhen you run this command, it will ask you to change the commit message in a file. After changing it, make sure you push into the correct branch with the following command. git push -f origin "your...

 git                     1 answers                     73 view
 2018-10-22         Claude

.gitconfig global remote URL to switch from GitHub to GitLab

Switching from github to gitlab. Imported all my repos. Now I want to continue pushing my code only to gitlab. How do I make this happen?I updated my .gitconfig file to use this, but it didn't change anything:[url "git@gitlab.com/"] insteadOf = git@github.com/ Do you have a git repo on GitLab? Your url = <url to your git repo> should be pointing to an existing git repo. Also git@github.com couldn't possibly be your git repo. Anyway, just make a repo on GitLab and point that url in your .gitconfigYou can follow this tutorial to make a new project on GitLab. After...

 git                     1 answers                     72 view
 2018-10-22         Kim

.gitlab-ci.yml Gitlab Deploy SFTP Not Working

deploy: stage: deploy script: - apt-get update -qq && apt-get install -y -qq lftp #- lftp -u $DEPLOY_USER,$SFTP_PASSWORD $DEPLOY_HOST -e "mirror -e -R -p ./dist/ new/ ; quit" - lftp -c "set ftp:ssl-allow no; debug; open -u root,$DEPLOY_PASSWORD -p 22 $DEPLOY_HOST; mirror -Rev ./ gitlab --verbose --ignore-time --parallel=10 --exclude-glob .git* --exclude .git/" - echo "deployment complete" # specify environment this job is using environment: name: staging url: https://xxxxxxxx.de/ # needs artifacts from previous buildCan you help me with a scri...

 git                     2 answers                     75 view
 2018-10-22         Shirley

Gitlab branches 'diverged' after merging two branches

I had a branch called refactor, which I merged into master, using the Gitlab web interface. This also deleted the source branch.Back in the shell, I noticed that git still thought it was on the refactor branch (which no longer exists). I tried switching branches back to master but I had done some further work locally, resulting in unsaved changes. I found a new (to me) command called stash, so tried that:$ git stashwarning: LF will be replaced by CRLF in Prec/EnquiryForms/wizard/manifest.xmlThe file will have its original line endings in your working directory.Saved working...

 git                     1 answers                     78 view
 2018-10-22         Gloria

Merge branch B to Branch A

I m running a jenkins pipeline for my project.Jenkins pulls the repository from gitlab and then runs my pipeline.So the problem is that i want to merge B to A on gitlab when the pipeline runs successfully.This is my Jenkinsfile which of course doesn't satisfy my need because it gives me the error merge: test - not something we can mergenode {try{stage('Build'){ def mavenHome = tool 'Maven' checkout scm sh "mvn clean install"}stage('SonarQube') { steps { sh "mvn clean verify sonar:sonar -Dsonar.branch.name="+ env.BRANCH_NAME } }stage('...

 git                     1 answers                     82 view
 2018-10-22         Jennifer

New gitlab instance is refusing to allow pushes

Installed gitlab, and the web interface, and logging indicate things are up and running. However, when I try to push a new repo to it, it fails with (for http):[gerry@boundary ct12Logger]$ git push -u origin master --verbosePushing to http://aaaa.bbbb.cccc.gov:8080/gerry/ct12-logging.giterror: The requested URL returned error: 401 Unauthorized while accessing http://aaaa.bbbb.cccc.gov:8080/gerry/ct12-logging.git/info/refsfatal: HTTP request failedSimilarly, with an ssh attempt...[gerry@boundary ct12Logger]$ git remote rm origin[gerry@boundary ct12Logger]$ git remote add ori...

 git                     4 answers                     86 view
 2018-10-22         Bert

Gitlab API: How to make a project at root / namespace?

we have a gitlab setup at our office, and I want to be able to make projects at it by command line I have been using the http curl to do so, but it always makes project on my name, rather than making it on root [/] namespacecurl --header "PRIVATE-TOKEN: 5xgss2ZZNcaWp4Hd" --data "name=testcurl9" http://192.168.1.91/gitlab/api/v3/projectsI am really out of clue as gitlabhq api doesn't seem to have any option for it The global/root namespace was removed in GitLab 6.0. A project can either be in a member's namespace or in a group's namespace. [XXX]

 git                     1 answers                     85 view
 2018-10-22         Arlen

Raspberry Pi and GitLab

Is there a way I can run GitLab (http://gitlab.org/gitlab-ce) and GitLab CI (http://gitlab.org/gitlab-ci) on a Raspberry Pi device running Raspbian?I want to have my own internal Git box where I can store code and possibly allow other friends access to upload their code too. Is it possible?Thanks. Official way for the Pi 2There is a very easy way to install it on the Raspberry Pi 2.wget https://s3-eu-west-1.amazonaws.com/downloads-packages/raspberry-pi/gitlab_7.9.0-omnibus.pi-1_armhf.debsudo dpkg -i gitlab_7.9.0-omnibus.pi-1_armhf.debYou might prefer to go to the officia...

 git                     5 answers                     90 view
 2018-10-22         Kennedy

GitLab and SSH/HTTP connection

I've just set up an Ubuntu 64bit server dedicated to GitLab.I have successfully installed GitLab and everything seems to work except for the SSH connection using a Git client ( SmartGit ).I click on "Clone", then I insert the ssh git URL:git@mydomain.test:root/firstproject.gitWhen I click on "Next" it gives me this error:Please check the repository URL.Could not read from remote repository.: /user/local/lib/ruby/2.0.0/net/http.rb:878:in 'initialize': getaddrinfo: Name of service not know (SocketError)from /user/local/lib/ruby/2.0.0/net/http.rb:878:in 'open'from /user/local/...

 git                     2 answers                     91 view
 2018-10-22         Bob

creating a repo in gitlab using CLI

We have a gitlab setup at our office, and we have somewhat around 100-150 project each week to create over there, while Admin wants to keep the control of creating repos and assigning teams to it, it seems quite a bit of task for anyone to create that many repos every week.Is there a way to create repo on Gitlab using CLI - I won't mind if i have to use ssh for it. You can use gitlab-cli and automate the process using a shell script. I've used this in gitlab 5.x, but according to the site it might not work with gitlab 6. [XXX]gitlab-cli is no longer maintained, the au...

 git                     4 answers                     90 view
 2018-10-22         Beck

Get raw file from repository

I want to get a file content in gitlab by using its api.Firstly, I check my gitlab version, its written as,GitLab Community Edition 9.4.3 b125d21 update asapThen I create a private token and http://gitadress/api/v4/projects/id/repository/files?private_token=PRIVATE_TOKENreturns as;{"error":"404 Not Found"}then I modify the query as;http://gitadress/api/v4/projects/222/repository/tree?private_token=PRIVATE_TOKEN this request returns as;[{"id":"8078365d80c","name":"test.js","type":"blob","path":"test.js","mode":"100644"}]What I want is to get the content of the test.js but wh...

 git                     1 answers                     97 view
 2018-10-22         Simon

Why git checkout after git clone?

I am new to git. I understand git basics as well as development procedures using git, however there is one thing that confuses me. Whenever I have to pull something from a git repo with multiple projects inside (example), I see these instruction steps:git clone xxxcd xxxgit checkout yyyThis is a bit puzzling to me. As I already have the entire repo, why would I want to checkout the project I am interested in if I can just copy the folder and do whatever I like with it? Note: I started this as a comment but it's long enough, and really can use some formatting, that I move...

 git                     2 answers                     33 view
 2018-10-22         Hyman

git -"<<<<<<< HEAD .." in source

This question already has an answer here: Git merge left HEAD marks in my files 4 answers Git conflict markers [duplicate] 1 answer How to resolve merge conflicts in Git 33 answers These markers mean that there was a conflict in your code (maybe after pulling), and you probably just marked the file as resolved instead of actually res...

 git                     1 answers                     35 view
 2018-10-22         Yvette

How to solve github conflicts?

I am taken course in udacity (not nanodegree) . It discuss git and github . In discussing pull and push , I asked my self what if a conflict happens . Several developers commits the files of course a conflict will happen .. i didn't find an answer .Can anyone answer my question? I tried to make commits in the same line in github and local repo and a conflict happened! The short answer is that the mechanism for resolving conflicts is called merging. "i didn't find an answer" - I'm not sure where you looked, but here a some articles to get you started:https://git-scm.com/...

 git                     1 answers                     36 view
 2018-10-22         Winifred

Move Commits from One Branch to Another Branch in GitHub?

I've got two branches on a repo in GitHub; one is the default branch master, and the other is called gh-pages. I set the default branch to be gh-pages on GitHub.I use VS Code Editor to code my project (coder-in-pink), so I created a new branch named gh-pages in VS Code, and I committed my saved work in the source control. I'm not allowed to embed pictures in my posts yet, so here's the little picture of the gh-pages branch I set in VS Code. (It might not be very helpful, though.)But today I found out that it had been committed to the master branch. How do I move/transfer it...

 git                     2 answers                     37 view
 2018-10-22         Agnes

Allow travis.ci to push github

I was hoping I could just add travis.ci as a collaborator, but didn't find anything in that direction. Maybe it's a security measure because they don't want to leak their credentials in the virtual environment. Other (unsatisfying) ideas:share my github credentials with travis via encrypted varscreate a separate github account for traviscreate separate ssh keys, share with travis (encrypted), add to my githubDoes anyone have a better idea?Context: I'm publishing my project from travis.ci and it automatically assigns a new version number that's tracked as a git tag, e.g. v1....

 git                     2 answers                     69 view

Page 1 of 817  |  Show More Pages:  Top Prev Next Last