Questions tagged [git]

Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

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

How can I allow Apache to read the status my git repo?

My website reports on the Git status (current commit and branch, mostly) so I can check at a glance whether it's up to date. This used to work, but the latest Git does not allow these things to be ...
user avatar
  • 311
-1 votes
1 answer
33 views

How to download all repositories of a GitHub account to my personal computer without using github cli? [duplicate]

I use WSL Ubuntu 18.04 unchanged. I have one GitHub user with 6 GitHub repositories of that user. Basically I just need to download all my GitHub repositories as I wish to make a local backup of all ...
user avatar
0 votes
0 answers
11 views

Automate application deployments on jboss servers

I would like, if possible, to recommend some line of technologies to carry out production of java applications (ear, war) in an automated way, to put in context, currently, there is a development team ...
user avatar
0 votes
0 answers
42 views

How to export all my GitHub account content in one action, delete the account and then import the exported content into a new GitHub account? [migrated]

I think about creating a new GitHub account, free from any previous communal collaboration and yet before I delete my account I want to export all of my repositories in one action instead download ...
user avatar
0 votes
0 answers
28 views

How to setup local server on Linux for testing Dokku?

I'm new to Dokku and nginx server and I'm trying to set up server locally on Linux Ubuntu 20.04 for testing purpose instead of using one such as Hetzner (Cloud) or DigitalOcean (which already contains ...
user avatar
  • 135
0 votes
0 answers
12 views

How can we create a deployment pipeline without triggering the build from Jenkins?

I have used webhooks which are triggering the jobs finely. But I also need parameters to be fed in the build job and don't want to manually start the build from Jenkins. It should happen once the ...
user avatar
0 votes
0 answers
19 views

Docker-compose for git-repository with concrete branch

I have a task to build containers from git-repository, using docker-compose. For example: version: '2.1' services: project: image: https://github.com/my_project.git container_name: my_project ...
user avatar
  • 123
0 votes
1 answer
59 views

Conversion of Debian "source package" for use on GitHub

Perhaps a dumb question, but I am new at this - so please bear with me. Here is a brief description of the situation: I recently learned of a significant, long-standing bug in dhcpcd - the default ...
user avatar
  • 2,079
0 votes
3 answers
34 views

Splitting a file into separate files based on a keyword on a particular column of each header line

I would like to create separate files based on the first chromosome mentioned in the header line. There are 24 chromosomes mentioned in the header line and their sequences are mentioned in the next 2 ...
user avatar
0 votes
0 answers
19 views

String concatenation failing after personal access token [duplicate]

What specific syntax needs to be changed in the commands below in order for the end result of the commands to produce the expected value of https://ghp_fyrwTOKEN_REDACTEDgugg@github.com/...
user avatar
  • 5,064
0 votes
1 answer
20 views

Git - find staged files with unstaged changes

I wish to detect if a staged file has unstaged changes, and add this to a pre-commit hook. For example, when the output is like this, I should be able to detect that README.md has unstaged changes. ❯ ...
user avatar
  • 103
0 votes
3 answers
54 views

Cloning source code

Within macOS Catalina, I have used: git clone URL to clone source code from GitHub. The target code is: https://opensource.apple.com/source/efax/efax-42/efax/ Is git clone not the right command? ...
user avatar
  • 1,104
0 votes
1 answer
38 views

How can I make the git-prompt.sh's output (branch etc.) bold?

I use git-prompt.sh to customize bash's prompt with Git information, e.g. branch. https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh I want git-prompt.sh's output to be bold, ...
user avatar
  • 3,287
2 votes
2 answers
56 views

How does find . -type f -print -o -name . -o -prune actually work?

As background, I'm using git on an hp-ux 11.11 (11v1) system. I'm doing an extensive .gitignore file to exclude many many files. My .gitignore is basically "Ignore everything, except these ...
user avatar
0 votes
1 answer
326 views

git clone from https URL fails, says it's 'remote-https' is not a git command and that templates werent' found

I'm working on a CentOS 7.9 GNU/Linux system. I've built and installed a newer version of git (2.34.1 instead of 1.8.3.1 that's bundled with the distribution) under /opt/git/2.34.1, with a symlink to ...
user avatar
  • 7,249
0 votes
0 answers
39 views

How to set a github/gitlab specific user using git config

I'd like to use a GitLab/GitHub specific user, author name and author email. How can I achieve that?
user avatar
0 votes
1 answer
56 views

While Installing pkg using yay, which AUR package (git / bin / stable) will you choose and where will you save it?

Whilst installing from Arch User Repository (AUR) we have several choices (git / bin / stable). However it's not clear which one should one choose and where should one save it. I have read the manual ...
user avatar
0 votes
1 answer
51 views

How to correctly use spawn-expect-send for 'git push'?

The code below is adapted from a solution to "Use Expect in a Bash script to provide a password to an SSH command", so as to pass arguments to git push. I'm not getting any exceptions for ...
user avatar
  • 479
4 votes
3 answers
393 views

Automate git pull with ssh authentication via a script (non-interactive)

I have a bunch of raspberry pis running Ubuntu 20.04 server, that I wish to update automatically via Git, non-interactively. The script does the following: eval "$(ssh-agent -s)" ; ssh-add /...
user avatar
0 votes
1 answer
33 views

Unable to use custom git commands on Mac

I created a script like shown here to simplify clearing out my git remotes. Created the file with the format git-{command} and made it executable. Included file in PATH. The script seems to work if ...
user avatar
  • 3
0 votes
0 answers
33 views

Git tab completion doesn't always work in zsh

Typing git TAB prints completion candidates, but typing git add TAB does not. This works in Bash though. The _git completion function is installed and loaded by zsh: usr/share/zsh/functions/Completion/...
user avatar
0 votes
0 answers
25 views

Problem with permissions using git on linux

I'm new to linux I have this installed on linux mint 20: XAMPP installed in opt folder Visual Studio Code Git AWS CLI The issue is that every time I want to do pull origin I have to use sudo, then ...
user avatar
1 vote
1 answer
16 views

How to connect from windows client to centos git server on local netwowk

In Linux CentOS: yum install git cd /home mkdir mysite cd mysite git init In Windows 10: git clone https://my_server_username:my_server_password@192.168.1.10/home/mysite/mysite.git it returns: fatal:...
user avatar
  • 111
0 votes
1 answer
16 views

pom.xml, **/pom.xml, **/**/pom.xml, then **/**/**/pom.xml... What shortcut to target a file we know its name, whatever its depth in directories?

To apply some changes to all my pom.xml files, I'm running these commands: git checkout --theirs **/**/**/**/pom.xml git checkout --theirs **/**/**/pom.xml git checkout --theirs **/**/pom.xml git ...
user avatar
  • 729
2 votes
1 answer
33 views

Is `git branch` using `less` a recent change? Or is `less` behaving differently recently?

Appologies for the vague title. I frequently execute git branch throughout the day, and it seems at some point recently (perhaps in the past month?) the behavior has changed. I recall previously git ...
user avatar
  • 2,054
0 votes
0 answers
106 views

Unable to generate ecdsa-sk key

Suddenly ssh stopeed working on my Ubuntu 20.04 installation. My openssh installation is: OpenSSH_8.8p1, OpenSSL 1.1.1m 14 Dec 2021 When I execute the ssh command to connect to a remote machine it ...
user avatar
0 votes
0 answers
25 views

Patching location

I'm not the most experienced with linux but usually I use git am or patch -p1 < filepatch directly in buildroot but I have to apply a new patch and it does not work in buildroot neither in /...
user avatar
0 votes
0 answers
33 views

Compressing AMD graphics include directory "asic_reg" saves up to 230MB Linux Kernel storage size. Can cloned downloads be partly unpacked by git?

Cloning a current kernel (e.g. 5.17-rc1 ) to a source directory requires around 1.4GB and a total of 2GB (debug kernels up to 4GB) free storage for compiling a default kernel configuration. While AMD'...
user avatar
2 votes
2 answers
148 views

Change the default comments in GIT's COMMIT_EDITMSG after typing "git commit"

Sometimes when I'm at work, I want to commit and push changes to my own projects on GitHub. So I do a lot of git config user.email to make sure that I don't commit with my email at the company and ...
user avatar
0 votes
0 answers
25 views

How do I track a subfolder in a submodule?

I've cloned NvChad to /config/nvim in my dotfiles. I want to keep track of the subfolder /config/nvim/lua/custom without keeping track of the rest of the nvim folder. How do I do that? I've added this ...
user avatar
1 vote
1 answer
13 views

removing last patching kernel

I build openwrt firmware and I just used a pr (patch kernel update) with patch -p1 < filename.patch and I want to remove to reapply a new one, what would be the best? thank you
user avatar
  • 65
0 votes
0 answers
39 views

Strange error using git after connecting VS Code to Docker container

After connecting to Docker container from VS Code, I got the following error as I used git to fetch changes from a server: internal/modules/cjs/loader.js:883 throw err; ^ Error: Cannot find ...
user avatar
  • 145
0 votes
1 answer
79 views

zsh: check whether I am currently inside my git repository (git check-ignore)

In my .zshrc, I am using following git command (from zsh prompt: check whether inside git repository and not being ignored by git) to check whether I am inside a git repository, so that I can change ...
user avatar
1 vote
1 answer
78 views

Display branch name in $PS1 on ksh88

I want to display my current git branch in the prompt in ksh88. I'm working on a legacy project, when the backend run on IBM's AIX, with a mandatory ksh88 shell. I can switch to say, bash, for some ...
user avatar
  • 111
0 votes
0 answers
32 views

How to break a long line into max length by word and use that programatically in a git commit [duplicate]

I have a scenario where I need to convert a long string of text and break it by words not exceeding a set line length (70 characters). I need to replace the space with a '\n' where the line break ...
user avatar
0 votes
2 answers
104 views

How to pull git repository on Linux Startup

I want a Kali Linux 2021 (with zsh) machine in a lab to pull the most recent copy of a git repository on startup. I can get the commands to run fine manually, but for the life of me I cannot get them ...
user avatar
1 vote
0 answers
37 views

Extracting a symlink-containing tarball on git bash

I wanted to extract a compiler's tarball on git bash on Windows 10: $ tar xzf polyml-5.8.2.tar.gz tar: polyml-5.8.2/compile: Cannot create symlink to ‘/usr/share/automake-1.16/compile’: No such file ...
user avatar
  • 758
0 votes
1 answer
122 views

Push contents of a read-only file system to remote git repo

I have on system A a (remote, read-only mounted from server B via sftp/sshfs) filesystem with data on it that needs to be pushed to a remote git repository regularly. I was not able to find a git ...
user avatar
1 vote
1 answer
61 views

How to limit git branch --format string length

I have this ~/.gitconfig alias: b = "!r() { count=10; git for-each-ref --sort=-committerdate refs/heads --format='%(HEAD)%(color:bold green)%(committerdate:relative)|%(color:yellow)%(refname:...
user avatar
0 votes
1 answer
99 views

Git is not updating [duplicate]

I am new to linux, and I have just installed git using, sudo apt-get install git-all When I attempted to restore a file after making modifications, I get the following error: git: 'restore' is not a ...
user avatar
0 votes
1 answer
103 views

git-daemon says 'not in whitelist' even if git-daemon-export-ok exists

I was trying to set up a git server. I set up the SSH server successfully, and now I was trying to set up an anonymous git service, but it's not working properly. I copied the sample systemd service ...
user avatar
  • 222
1 vote
2 answers
286 views

Self update bash script if there are any updates first then continue on, with Git

I'm trying to add the ability for my ArchLinux installer script to check if it's update-to-date based on rather it matches (or doesn't match) the version number that's on gitlab. The primary script ...
user avatar
0 votes
1 answer
49 views

Is there a way to disallow a certain combination of commands and options?

Say, I create a new repo, and try to commit. Git shows me *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your ...
user avatar
  • 103
0 votes
1 answer
34 views

How to fallback on git cloning in bash?

I want to automate some setup tasks. When a team member writes setup which is our internal command, a couple of things would be done. One of those things is to make sure the latest version of our ...
user avatar
1 vote
2 answers
29 views

Can I clone a branch of an unrelated remote repo into a branch of my git repo, and keep it updated?

I have a local repo with some code in it in different branches. There happens to exist a git repo out in the world that has the same software, but a disconnected git history. (I don't think it matters,...
user avatar
  • 37.9k
0 votes
1 answer
31 views

Checking command nested in conditional with shell [duplicate]

I am currently trying to create a short and portable way to check if my working git directory is dirty and return T/F accordingly. My ultimate goal is to incorporate this into a Makefile and I have ...
user avatar
  • 3
0 votes
1 answer
56 views

Non-stowed files in stow directory and git

I Stowed a couple of files which were in a folder. This folder is a config folder and has other temp or system specific files which I don't want in my Git backed Stow backup. What is the best way to ...
user avatar
0 votes
1 answer
50 views

Is there a better way than string output hacks to check git checkout needs a pull to update?

Basically i have a automated building script where i do a checkout of a local branch, and want to step to pull remote updates with git pull && git submodule update && make clean only ...
user avatar
  • 167
1 vote
0 answers
42 views

Can't move or rename folder in git repo, permission denied, despite being 'drwxrwxrwx', and bareword [duplicate]

I'm using Windows Subsystem for Linux 1 (WSL1), I want to rename the folder my code downloads files to from 'resources' to 'downloads' so I can group my files that do the downloading under a '...
user avatar
0 votes
3 answers
196 views

Bash script: Avoid single quotes added to string

I'm trying to get an output of one function and pass it to other. set -x OUTPUT=$(git diff --name-only --diff-filter=AM develop... | sed 's/.*/"&"/') ./bin/phpcs $OUTPUT My main problem ...
user avatar
  • 103

1
2 3 4 5
19