Questions tagged [git]

Git is an open-source distributed version control system (DVCS). Use this tag for questions about Git usage and workflows. Do not use this tag for general programming questions that happen to involve a Git repository. Do not use this tag for GitHub/GitHub Actions questions that do not involve git usage; use [github] or [github-actions] instead. Do not use the [github] tag for Git-related issues just because a repository happens to be hosted on GitHub.

Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

How do I make git config --global alias. as alias

I was actually trying to create a git alias for "git config --global alias" command but couldn't succeed. If anyone is aware about it please do reply. Thanks !! I tried the one shown in the ...
DataType's user avatar
-1 votes
1 answer
20 views

Accidentally deleted local branches after changing the workspace in VS Code

I accidentally lost all local branches after changing the workspace without saving it in VS Code. Now, the only branch I have is master. Is it possible to restore all these lost branches? Tried to ...
exsotty's user avatar
0 votes
0 answers
18 views

Using Git from a Docker container

For the sake of avoiding any dependency issues, I am attempting to do all my development from within Docker. In other words, although I have a Git repo on the host, I'd like to do all the coding from ...
Tfovid's user avatar
  • 771
-4 votes
0 answers
20 views

What is the purpose of the "git merge" command, and how does it differ from the "git rebase" command in Git version control? [duplicate]

What is the purpose of the "git merge" command in Git? How does it differ from the "git rebase" command?
Snehil Tiwari's user avatar
-2 votes
0 answers
31 views

Git Installator missing extension [closed]

I urgently need to install Git for Windows 10 64-bit. I downloaded Git Installer from Official Website, but it seems to be missing extension. It is just a raw extensionless file called a93c7233-5099-...
theuserthatpretendstobesmart's user avatar
-1 votes
0 answers
13 views

Intellij locked up, and after force quit lost All work

On Mac, yesterday created 4 projects and worked all day on them. While creating files, I accepted to put it in source control although I do not remember specifically saying what git to use. Today when ...
Geodepe's user avatar
  • 153
-1 votes
1 answer
43 views

how can I change git directory?

I wanted to stage my project but when I typed git status I saw it's telling me that some of my files are untracked and the untracked files were not in my current directory: (https://i.stack.imgur.com/...
TheToy's user avatar
  • 1
-3 votes
0 answers
17 views

"Is there a way to undo the last commit in Git without losing changes?" [closed]

Certainly! When I want to undo the most recent commit in Git, you can utilize the command git reset --hard HEAD~1. This effectively removes the latest commit along with its associated changes from ...
prince Panchal's user avatar
-4 votes
1 answer
31 views

Fatal Error: Bad Boolean on Git Push Attempt

I get this error "fatal: bad boolean config value 'origin' for 'push.autosetupremote" and now I can't push my code anymore This error came after I tried to make it so that when I can push ...
George05's user avatar
0 votes
0 answers
27 views

Changing Git repository path , while building code through .yml from GitLab

I have a RHEL runner and creating a CI/CD pipeline to build the project using .yml file from GitLab. When I try to run the pipeline using .yml from GitLab, it automatically creates a folder as ...
Santosh Sahu's user avatar
  • 2,154
-4 votes
0 answers
31 views

git command is not returning any value in make file [closed]

git command is not returning any value in make file. git command is returning any value in make file. Please help me. the question is based on git and make file. Thank you for your time to for reading ...
Sarthak Saini's user avatar
-1 votes
0 answers
22 views

What is the best practice for cloning private repo to GitHub for public access and issue creation? [closed]

My company uses a private GitLab instance. We're now developing an SDK for our product and we want to make the project available on GitHub, mainly so users have a place to create issues. Ideally, we'd ...
leros's user avatar
  • 551
-1 votes
0 answers
25 views

how can I list the different git commits that affected any file in a particular directory? [duplicate]

I am facing a situation where my customer says "what have we changed?" as he thinks things were working better "before". However, there are many (complicated) scripts and no ...
Eric Mamet's user avatar
  • 2,869
0 votes
0 answers
21 views

Trying to install Stable Diffusion for the first time on Windows11, getting this error:

git config --global --add safe.directory F:/DOWNLOADS/stable-diffusion-webui-master/stable-diffusion-webui-master/repositories/generative-models Traceback (most recent call last): File "F:\...
Gen Sue's user avatar
0 votes
1 answer
24 views

git: how to set up cross-platform .gitconfig with core.sshcommand?

I keep my .gitconfig in a repo, and use it across Windows, Linux and MacOS. Recently I've set it up to work with the system OpenSSH on Windows 11. That requires this setting: [core] sshcommand=C:/...
GaryO's user avatar
  • 6,024
-4 votes
0 answers
34 views

No value is being returned in the makefile by the GIT command [closed]

GIT command is not returning any value in makefile. GIT command is not returning any value in makefile. no value is being returned in makefile by the GIT command. I tried so many times but same ...
Saksham Malhotra's user avatar
0 votes
0 answers
12 views

Git submodules update after devcontainer starts

I'm trying to create a devcontainer that automatically initializes and updates the submodules when the repository is first cloned. I have a repository on GitLab with different submodules and a ...
sctx's user avatar
  • 156
0 votes
0 answers
22 views

bitbucket ssh requires [email protected]'s password

So I generated a ssh key and added it to bitbucket, then when I "ssh -T [email protected]" in the terminal, it requested the "[email protected]'s password". This problem did not ...
jhuai's user avatar
  • 67
0 votes
0 answers
18 views

Git sees all my files from /PycharmProjects

Recently I have faced a strange and annoying problem: working with git from PyCharm, git checks all the files and projects from my ~/PycharmProjects directory. It makes committing impossible since ...
Rostislav Gänse's user avatar
-1 votes
0 answers
9 views

Xcode When I delete from Xcode project file .xcodeproj, how to return this file [closed]

I delete .xcodeproj file from my Xcode project with cocoapods. I had only local commits, but now, when I watch my files its empty. How can I return my files? Now I have only empty files with names and ...
Dima Bogonos's user avatar
-1 votes
1 answer
37 views

How to preserve newer commits timestamps when squashing older ones?

Let's say I have this series of commits: A -> B -> C -> D -> E With A being the oldest one and E the newest one. I want to squash A and B, but that would need to recommit everything and ...
hammon5tl's user avatar
1 vote
1 answer
17 views

fork a repo in the same namespace with gitlab

what's the best way to fork a repo in the same namespace? I have one repo that is shared publicly, but I want to fork a repo in the same namespace that is only private to me so I can do some updates ...
llodds's user avatar
  • 163
-1 votes
0 answers
28 views

How to rebase main branch of remote repository on git

$ git add -A error: open("docs/code-of-conduct.md"): No such file or directory error: unable to index file 'docs/code-of-conduct.md' fatal: adding files failed I am trying to rebase remote ...
Tuba Mouqeem's user avatar
0 votes
1 answer
44 views

Git LFS - Truncating Remote History

I have a Git repo that is using LFS Storage. The purpose of the repo is to store and track version history of DOCX files on a single (master) branch. I initially started using LFS to reduce the ...
user2437443's user avatar
  • 2,086
0 votes
0 answers
26 views

How to push dates of all commits backwards

I added git today and commited some changes but the date it is showing is today. I would like to pus all the dates back by 2 days . So when I push to github it would appear as 2 days ago. I tried ...
Samuel's user avatar
  • 1
-2 votes
0 answers
12 views

asking about xml and iml files in intellij idea [duplicate]

when I pushed an IntelliJ project to GitHub there were files with extensions .xml in the .idea folder and .iml being pushed, my question is should these files be pushed, or do I have to put them in ....
Eslam Radwan's user avatar
0 votes
1 answer
25 views

Print only git branch prefix

I would like to print only the branch name prefixes of a git repo. For example, if a repo had the following branches, bug/nasty-problem feature/neat-thing feature/awesome-thing main is there ...
intervort's user avatar
  • 113
-1 votes
0 answers
29 views

Merged into incorrect branch

I accidentally merged into the wrong branch in Gitlab, but neither the "Revert" nor the "Cherry-pick" button works so I need to correct this on the terminal. If I go to the branch ...
Daniel's user avatar
  • 14.3k
2 votes
1 answer
33 views

How can I create a private merge request template with GitLab?

Is it possible to create a merge request template for me and only me? According to the documentation it is possible to create a merge template for a repository but I want a template just for me and ...
Kevin White's user avatar
0 votes
1 answer
36 views

What is best practice for patching a prior release?

I'm working on a project where we need to patch an old version of our library. We publish/release this package to GitHub Package Registry and (needless to say) use semantic versioning. This is our ...
mellis481's user avatar
  • 4,454
0 votes
0 answers
31 views

The folder "obj\Debug\net7.0" keeps causing conflicts whenever I try to merge branches

whenever I checkout to another branch it seems like certain folders, such as "obj\Debug\net7.0", always seemed to get modified somehow, particularly after I stage, commit, and push the ...
yt10's user avatar
  • 3
0 votes
0 answers
41 views

bat file not running git push as generic user in task scheduler

I have set up a schedule in task scheduler to run a bat file containing git commands as a generic user. This bat file contains the following commands: cd C:\repo call D:\path\to\git --git-dir=C:\repo\....
bocodes's user avatar
  • 387
0 votes
0 answers
27 views

How can I bring origin/HEAD to my current commit?

In my local repo I am working in branch main. The same branch exists in my remote repo. Some time ago both branches were in sync, origin/main and main pointed to the same commits. But then I maybe did ...
burn4science's user avatar
-1 votes
0 answers
19 views

how can i solve python questions

git command is not reutring any value in makefile im just want answer I’m sorry to hear that you’re having trouble with your makefile. Based on my research, it seems that the error is due to the ...
Rajnish's user avatar
0 votes
0 answers
28 views

Copying a directory from the master branch into an empty orphaned branch?

I'm trying to copy the projects/slice/src/lib/ folder from the master branch of this project into an empty orphaned lib branch. The directory structure projects/slice/src/lib/ should be mirrored in ...
Ole's user avatar
  • 42.8k
0 votes
0 answers
12 views

How to ensure data integrity when Git error occurs: RPC failed: curl 56 failure when receiving data from the peer

From this issue: RPC failed: curl 56 failure when receiving data from the peer I have the same issue, and like the OP I am not sure the clone completed 100% correctly. Is there a way for git to verify ...
hanitors's user avatar
  • 153
2 votes
1 answer
53 views

How to configure a Git commit template for the repository?

I want to modify the default template for the commit message in Git. But till now I was not able to find a way how to do it globally for the whole repo. I only found possibilities to do it locally via ...
Szdnez's user avatar
  • 59
-1 votes
0 answers
42 views

Could squashing commits cause conflicts between two branches?

I have two branches. One is called 'task-number-six', the other one is 'task-number-seven'. I want to squash the commits of both branches. Normally, I would do it by firstly squashing the 'task-number-...
VaQuellJQL's user avatar
-2 votes
0 answers
37 views

git push with not all files from repo, but not --force

I usually don't keep .md files locally, so, always that I'm trying to push, I have to pull them from the repository. I'd like if there were a way to just upload files such as we can do with drag-and-...
alaanvv's user avatar
0 votes
0 answers
22 views

What best practices git repo for complex dev environment? [closed]

folks! Our infra consists from 7 services. Each of them has own repo, and builds with different technologies, actually: four python, one JS, two rust projects. All of them are dockerized. We deploy ...
Gulaev Valentin's user avatar
-1 votes
0 answers
12 views

Homebrew Installation Error: "remote: invalid credentials" - Authentication Failure

I'm encountering an issue while trying to install Homebrew on my macOS, and I'm receiving the following error related to invalid credentials: Error message : Username for 'https://github.com': [...
asad ishaq's user avatar
0 votes
1 answer
35 views

Does running git switch --orphan lib switch me to the lib branch?

If I understand correctly running the following should create an empty orphaned lib branch. % git switch --orphan lib Switched to a new branch 'lib' And git seems to indicate that it has now switched ...
Ole's user avatar
  • 42.8k
-3 votes
0 answers
38 views

Git command is not returning any values in Makefile [closed]

Git command is not returning any value in makefile. The user running the makefile may not have the necessary permissions to execute Git commands or access the repository. The output of the Git command ...
Paras Bajaj's user avatar
1 vote
1 answer
56 views

Azure pipeline: can't push a file to an already-existing Azure repo branch

I'm trying to write an Azure pipeline that: runs a python (myTestPythonFile.py) script that queries an API and returns a json file (myJson.json) pushes this json file to a specific branch (...
Vincent Tep's user avatar
2 votes
1 answer
42 views

Is it possible to know which editor git is going to use programatically?

Is it possible to know which editor git is going to use programmatically? Something like this is possible? $git which editor /usr/bin/nano Basically, I wanted to invoke a custom editor only for git ...
Sourav Kannantha B's user avatar
-2 votes
0 answers
25 views

How to create common tags for a Symfony project and its Git repositories?

I'm working on a Symfony project that consists of a main project and several bundles. Each bundle is a separate Git repository on GitLab, and I want to create common tags for both the main project and ...
skyhell's user avatar
  • 39
-4 votes
0 answers
55 views

Git command is not returning any value in makefile what to do..? [closed]

Git command is not returning any value in makefile I tried to use git command but it is not able to return and value in makefile However when i run make get_log, nothing is returned, althoughif I run ...
Harsh Yadav's user avatar
-2 votes
0 answers
48 views

Git hook commit message

I want my commit message to follow a format i.e. Jira-ticket STORY|BUG|REFACTOR jira description. Example: BLRG-1234 BUG ui alignment issue Currently I am using the following regex: #!/usr/bin/env ...
Thejas's user avatar
  • 415
0 votes
0 answers
24 views

Hide the folders in the working directory that are not related to the switched branch | migrating create-react-app to nextjs

I have two branches that I jump between, branch A has a folder called ".next", while branch B doesn't have that one. When I switch to branch B after committing my changes on branch A, the ...
Normal's user avatar
  • 1,853
1 vote
0 answers
19 views

Sumbodule strategy to be used with "fetch" git strategy

I try GIT_STRATEGY: fetch and it works fine - reuses code from the previous job. The problem there is no corresponding value for GIT_SUBMODULE_STRATEGY in docs. If I use recursive it will always ...
noname7619's user avatar
  • 3,478

1
2 3 4 5
3025