Questions tagged [git]

Use this tag for questions about Git, a free and open source distributed version control system, related to using Git for topics such as continuous delivery, monitoring, building SDLC infrastructure, etc.

Filter by
Sorted by
Tagged with
0
votes
1answer
24 views

jenkins credentials not used as expected when cloning git repo

I am trying to setup a jenkins pipeline for my IaC code validation, for this I'd like jenkins to clone a gitlab (hosted) repository, for this purpose I setup a credential using username / key type, i ...
1
vote
1answer
27 views

Jenkins Git Client Plugin Issue

Git Client plugin previously was version was version:3.0.0-rc(beta) which has security vulnerabilities so upgraded to latest version:2.8.6 (latest). But unfortunately all the dependency plugins were ...
6
votes
1answer
98 views

What is the difference between DevOps and GitOps?

I am hearing nowadays a lot about GitOps. What is the difference between DevOps and GitOps? Is it just the SCM does the build and deploy when there is a commit instead of the CI/CD tool exclusively?
0
votes
2answers
53 views

Is there a way to use a Jenkinsfile from a git-submodule in a multibranch pipeline?

Background: The nature of our project's source involves multiple long-living branches, each one has its own Jenkins job (manually created). Multibranch limitation: Unfortunately we do not use a ...
1
vote
1answer
18 views

How to execute shell command or call URL on new gitlab issue?

I want to execute a shell command or call a URL when a user creates a new issue. The reason behind this is to synchronize our Gitlab issues with our CalDav calendar infrastructure. We are using Gitlab ...
0
votes
1answer
10 views

How to build Java project on existing virtual machine in Azure?

In my project we are using Azure DevOps in which we have a pipeline which pulls code from code repository downloads Ubuntu container installs Maven downloads all the dependencies then tries to build ...
0
votes
2answers
42 views

Git Release branching strategy for Continuous integration and deployment

We have tried multiple branching strategies to adopt CI/CD. Developers develop on the feature branch and then merging to master which get deployed to QA for testing and then master is deployed to ...
1
vote
2answers
45 views

Migrating from TFVS to GIT using GIT-TFS

We have a large TFS repository which we would like to migrate to git. We are considering using git-tfs for a while, in order for everything to continue working while we migrate. We have large (or ...
1
vote
1answer
99 views

Git-based CI/CD Pipeline for Monorepo

Are there established CI/CD strategies & best practices for working with a distributed team on a project that is utilizing monorepos? I can provide two specific use-cases: Working on content ...
0
votes
2answers
40 views

How do I configure Jenkins to trigger on a pull request based on the Git branch's name?

I want pull requests to Git where the target is master and the source has a string "foo" to trigger a Jenkins build. If this string "foo" appears in the source branch's name when there is a pull ...
0
votes
0answers
13 views

How can Bitbucket webhooks be invoked after they are deleted?

I am using Jenkins 2.x and Atlassian Bitbucket 4.x. I deleted a webhook in Bitbucket. However this webhook keeps triggering builds in Jenkins. Bitbucket may be powered by Kubernetes, but I am not ...
0
votes
0answers
45 views

How to view statistics on code churn per developer and commit data using Power BI?

I have been tasked with creating a report on developer efficiency statistics and would like any pertinent information on how to use Power BI with our Azure DevOps repo (or any other means, this was ...
0
votes
0answers
28 views

Distributed git directory shared between directories, but with different branch on each directory

Is it possible to have a .git directory shared between multiple jobs in Jenkins, where each job is using a different branch? Reason for the question: The repository has 30 GB (all components in one) ...
4
votes
3answers
135 views

What options are available to encrypt the content of git repositories?

git-crypt, git secret were found. What is your personal preference and why? A couple of months ago, I have applied git-crypt. It was quite hard to set it up and the secrets are stored as binaries. I ...
0
votes
0answers
24 views

Block binaries from Git

How can I prevent users to push binaries file into our Git server? We are using Bitbucket as server, and I tried ScriptRunner but I can only block according to the file suffix, I am looking for ...
1
vote
0answers
16 views

Mounting ssh keys on ephemeral container from a Windows host

I'm working on a container that uses Git to interact with some git repositories. But, to use Git it has to use the SSH keys that are stored on the Windows host machine. I tried two of the ways I could ...
0
votes
2answers
738 views

CI/CD pipelines Azure devops automatic merge after deploy release

I have a classic env. setup like following: I have 2 branches : Develop and Master. Is there any way in azure devops to setup the following rule: When a deploy is succeeded on dev environment (...
0
votes
3answers
89 views

Auto Deploy after push to git

I have some Codeigniter projects on some domains (on the same server), and the project is already in git. How to ensure server gets the new update when I push the code to git? Can anyone explain ...
1
vote
1answer
73 views

Gitflow with pull request or pull request

My team is currently using gitflow workflow into develop branch. Here is an overview for what we are doing. We are a sql server data warehouse team using Azure repos and Azure devops to build and ...
0
votes
2answers
1k views

How to trigger Jenkins Pipeline by push in specific branch in Bitbucket?

I've created Jenkins Pipeline Job, activated "Build when a change is pushed to BitBucket" trigger. I've also specified branches to build. But pipeline is triggered by all branch changes. Also I've ...
0
votes
0answers
11 views

How to include releases of some repo in another GitHub repo?

I have some project which consists of repo A (which contains sourcecode) and repo B (which contains config files for the project). I want to make another repo C to represent the whole project, and ...
0
votes
2answers
50 views

How do I automate the process of pulling the latest code and restarting a service on git push?

I have an application (Logstash) running on a Linux VM and the settings for it are on a GitLab repo. What I want is for the VM to pull the latest version of the settings file and restart the service ...
0
votes
1answer
23 views

git - develop base and extended feature - commits in base should reflect in extended in pull

Hie I am working around in git to achieve something like mentioned below. Imagine there is a Big feature which is going to develop - since it's very big they have split into core feature and an ...
2
votes
3answers
113 views

What are the best practices of merging dev to master?

We have 2 branches (master/dev) + some feature branches and 2 environments (production/dev). Our team is a very small people. What are the best practices of merging dev to master? Every morning? ...
0
votes
0answers
133 views

How to completely replace master with another branch in TFS Azure Devops

Using TFS Azure Devops, there is a repo with valid code being maintained in a secondary branch. However, the master branch is multiple years out of date. I want to obliterate the contents of master ...
0
votes
1answer
16 views

TravisCI did not run after adding more configuration to .travis.yml file

I added some AWS keys to my .travis.yml file so that it would deploy my application over to ElasticBeanstalk, but after I committed the changes to the file and pushed to master, nothing happened. I ...
0
votes
2answers
123 views

Connecting GitHub to Jenkins running on docker toolbox

Started to learn DevOps 3 days ago, so I have a lot to learn! I have a jenkins running on docker toolbox container and I can access it via 192.168.99.100:8080. I configured a job and managed to use "...
0
votes
1answer
20 views

Github rest api post label gives error for array input

We are hosting GitHub enterprise for our development. I am able to access the reset api and create jira, create PR etc. When I try to add label to my PR, it gives error for array. curl -X POST -u ...
0
votes
0answers
108 views

How to build docker image from git repository with root context and Dockerfile inside a subdirectory

In the docker documentation one can see that it is possible to build an image from git repository. It is even possible to make a build from the selected branch and directory. I have a repository with ...
0
votes
2answers
48 views

How to keep original and new repositories in sync during a migration? (including the commit history)

We have a git repository that is currently hosted on Azure Devops and have to migrate it to our in house TFS 2017 git (the move is due to a business decision). But during this setup we need to run ...
8
votes
3answers
86 views

Should developer wait for CI pipeline to complete or start next task after pushing

My company is integrating CI/CD, so far we have implemented CI from what I understand. Currently when a developer pushes code to our git repo, the CI pipeline runs. Currently our CI pipeline include ...
1
vote
0answers
108 views

VSTS Azure for DevOps: Unit test checking mechanism on pull request

Is there a way in VSTS Azure for DevOps to implement unit test checking mechanism on pull request. The condition is to only allow commits that change something in the unittest folder for example. ...
0
votes
2answers
94 views

Automate creation of branch + pull-request

I have a repository (call it repo-X) of shell.nix files that define development environments for a number of separate projects (call them project-A, project-B). When one of the projects releases a ...
2
votes
2answers
186 views

Gitworkflow and testing short lived feature branches in Openshift/Kubernetes

Recently my team started adapting git workflow for agile-based delivery, we've been using JIRA, TeamCity and various other CI tools to complete the pipeline. The workflow works great for monolith or ...
0
votes
1answer
29 views

GitHub merge access

I am trying to create a GitHub workflow (not GitHub flow), where specific people will have merge only access to a branch in repo. I tried a few things, and I found that I can restrict users to read ...
3
votes
1answer
555 views

Run scripts which are stored in GitLab from Jenkins

I have configured Jenkins Build Jobs and Deployment Jobs from using Jenkins shell. But I put all the commands in Shell to execute. Can I store those commands in GitLab and execute from jenkins?
0
votes
1answer
42 views

Push specific changes (defect fix) and not feature changes

I am new to DevOps. I am using Jenkins and GitHub for salesforce deployment. Setup We have a develop branch. Feature branches are created out of it. When merged to develop, the deployment to the ...
1
vote
0answers
44 views

Appropriate use cases for git submodule and braid

For what use cases are git submodules (or subtrees) better suited than braid and vice-versa?
2
votes
1answer
181 views

Where is the git submodule revision actually stored?

I understand how to use git submodule to reference a specific commit in another repo, but where is that reference actually stored? It doesn't seem to be in .gitmodules as plain text?
1
vote
1answer
550 views

How to use Jenkins github user credentials to access github api in my script?

I have a Jenkins job foo that works perfectly well. It is authenticated with jenkins_foo_user. It is able to clone the repo and checkout the right branch. In my codebase, I have another script - ...
4
votes
0answers
261 views

How to implement GitLab Flow branching model for microservices?

Recently I’ve been looking into alternatives to the git flow branching model and since I’m already using GitLab, I stumbled upon their own branching model called GitLab flow. I’m currently trying to ...
0
votes
2answers
19 views

How to make one branch public while the others remain private on GitLab?

I am currently working on a LaTeX template. I chose gitlab to host the template. Now I want to give some colleagues access to my template, but only to the master branch. I use the other branches to ...
4
votes
3answers
230 views

Tips for separating DevOps Git repos?

We currently have a Git repo with automation code (with tests), iaas-code and lamba-code. The automation code is mostly Fabric, Python and unittests. The Iaas-code is mostly CloudFormation, Docker-...
1
vote
0answers
19 views

How to configure a pull request quorum making an organizational constraint?

Consider the following situation. Alice and Anna, Bob and Bart, and finally Eve and Evelyn work on same Git project in three different organizations. How can they configure a quorum for pull ...
3
votes
1answer
167 views

What's the practice to perform a releasing with Git?

I'm using GitLab CE with Maven project, and try to follow the Environment branches with GitLab flow and The 11 Rules of GitLab Flow The step for releasing is as the following: - feature +--- +-...
1
vote
0answers
266 views

Chef git private repo using username/password

I am wanting to clone a git repo using the git resource in Chef but instead of SSH like everywhere seems to show I want to use just username/password. The security of the repo is not important but don'...
3
votes
1answer
91 views

When to get rid of '-SNAPSHOT'

I'm working on a Git workflow (not git-flow) for a Java project that uses Maven and Artifactory for artifact storage. On develop and feature/* branches the version number contains '-SNAPSHOT'. It is ...
3
votes
2answers
117 views

Git - Everyone Pushing to Same Branch in Different Files

Database team is implementing code changes, using Visual Studio SSDT database projects with Git source control. Everyone is pushing to main Release branch with code review (only 5 developers on the ...
2
votes
1answer
1k views

jenkins fatal: ambiguous argument, unknown revision or path not in the working tree

In jenkins pipeline, execute git command : git log --format=%B --no-merges origin/master..origin/${currentBranch} jenkins output error : fatal: ambiguous argument 'origin/master..origin/XOPS-...
2
votes
2answers
113 views

Merging Git Database Commits from One Branch to Another without Cherrypicking

We have main two Git branches at our company: During our Sprint, Everyone has (local branches) Release branch: Contains prepared/developed code, ready for testing, and Master branch: Production- ...