Git is there a hack for fully functional cross-platform shebang line?

Problem: apparently the scripts in the .git/hooks directory depend on the filename matching one of: post-commit pre-commit pre-rebase etc ... No concept of "file extension" is required because the "shebang line" indicates how the file should run, as long as it is executable and running on your Linux box. The problem is when you have some scripts that you want to run on a Windows box. Question: Is there a way to execute the hook scripts that can be understood on a Windows machine?

Git call for insight: revision control and binaries

humans write source code revision control is used to record changes in the source code tools process source code and generate machine-readable stuff (exec, libs, GUI code, etc.) every once in a while i would like to save a copy of the tools' output (e.g. save executable of beta-release for ARM). i can manually save the tools' output giving it a name which reflects the point in the revision control history (e.g. use tag name). this seems awkward and error-prone. i would like your insight into

Git Recommended workflow for multiple modules (themes)

I have an app (cms) which structure is like this: BASE: /application/ /public/ themes/ default/ mobile/ This is a base, central repository for all our projects. Then the projects get their own skin: (which are based on /default/ theme) CLONE1: /application/ /public/ themes/ default/ mobile/ own/ ... own-theme-12/ (this app has 12 custom themes based on the default one). The whole t

Git How can I change code within a commit to help find a bug?

I am trying to track down a specific bug in my code, but the trouble is the bug appeared somewhere in a block of commits where the only way to check if the commit breaks is commented out, so I can't see which commit it is. I need to change one line of code, and have that line merge into several commits, can this be done?

Git How does a commit disappear from the log of one file?

So I made a change to a file, pushed it to our main repo, saw it there. David pulled from that repo and did -- well, something -- and couldn't see my change. Since David is a typical Microsoft victim, I asked him to push what he had back to the repo and I'd look at it there. git log --name-only produces commit 194b7f5dbb59d29ace340a376f10906752978db5 Merge: 484df79 afc2dec Author: David Good <david@company.com> Date: Sat Sep 24 11:47:14 2011 -0700 [ David's merge ] commit afc2dec4a

Git save and recover

I just broke my codebase. I want to rollback to my last commit, but I want to save off the broken version first, so I can analyze it later. What's the best course in this situation? (I haven't actually tried anything, just looking for some hand-holding- It's been a long day and I don't feel like screwing this up..)

Git How to make master/origin aware of a subtree

I have multiple apps that use a shared set of files. I would like to manage these files using subtrees. I have successfully set up one local clone by checking out the master files and adding the shared source as a subtree: git subtree add --squash --prefix shared git@github.com:githubaccount/shared-repo-name.git master This works locally but I can't find a way to make the origin aware of the subtree so that my colleagues don't have to manually add the subtree every time they clone the master

git-svn clone | spurious branches

I used the following command to clone svn repo into git and after executing it, i see some spurious branches. git svn clone [SVN repo URL] --no-metadata -A authors-transform.txt --stdlayout ~/temp git branch -a *(no branch) master remotes/abc-1.3.x remotes/abc-1.3.x@113346 remotes/abc-1.3.x@541512 remotes/branch_test_script remotes/tags/modules-1.2 remotes/tags/modules-1.2@113346 remotes/tags/modules-1.2@516265 remotes/tags/release-1.1 remotes/tags/release-1.1@113346 rem

Using GitHub with WampServer? Or, only including certain directories?

Forgive me if this has been asked before, but I've been doing a lot of searching and haven't been able to determine the best solution to my problem. I've been the sole developer on a project that now will likely involve another person. Up until now, I have never used a version control system before, other than simply backing up my files every day (cave man's version control :-) ), but now I need a way for more than one person to update files. After doing some research it seemed that GitHub wou

git how to clone and track all branch

Possible Duplicate: Is it possible to clone git config from remote location? As in the title, How do I clone repos and track all remote branches automatically at once? When I clone remote repos, it only tracks origin/master, then I need to track other remote branches manually. Is there any way to do this automatically?

Error / warning messages on git push

When I perform a successful git push, I receive the following messages. remote: /usr/bin/env: ruby: Arquivo ou diretório não encontrado error: cannot run hooks/post-receive: No such file or directory Why is it looking for ruby and why is it trying to perform some post-receive hook?

Git: Erasing the history of a file?

I have been pushing to a repo for a while. At one moment we had a Base.pm perl module where we kept also some passwords. Later we removed the passwords, but since git (& github.com) remembers everything, when I check the "history" of the Base.pm file I can see old versions where the passwords still appeared. I want to erase the history of that file. Is there an easy way to make this?

Maven Git Repository

I'm a newbie to both Git and Maven. I need help in building a war file through maven buy getting the maven project in git repository. Currently i have the maven project in the local git repository and i'm running the mvn tomcat7:deploy command on the project root directory to bulid and deploy it on the tomcat server and i succeded in that. But i wanted to know how to get the maven project from remote git repository and update the local git repository and build the war file. My current POM.xm

Unable to delete a file in git

I have something a weird behaviour with a file containing unicode character: Spécifications fonctionnelles v1.4.pdf I don't know what happened but since a few hour I have the following git status message: $ git status On branch master Your branch is ahead of 'origin/master' by 4 commits. (use "git push" to publish your local commits) Changes not staged for commit: (use "git add/rm <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard chan

'git pull --ff-only' from shared bare master showing pulled changes as deletions (git 2.1.1)

Using git 2.1.1 over NFS with a bare master repository. Users are occasionally seeing an otherwise successful 'git pull --ff-only' into a repository with no outstanding or un-pushed changes of any kind (added, cached, or otherwise) will result in the local sandbox reporting as local deletions all the changes it should have added to the files when the pull occurred. The history is correct, as are the SHAs, but the changes it should have applied to the files are missing and are reported as edits

Are remote git clients vulnerable to CVE-2014-9390 if only trusted users have SSH access?

If I have a git client on a remote server and only X users have SSH access, should I be concerned with updating git on that server specifically to patch against CVE-2014-9390? It seems to me that the vulnerability is strictly related to .Git/config being clobbered on a case insensitive filesystem, which would require a git push, which would only ever be accepted (in this case) by trusted users that already have SSH access. Is that the case? Am I missing anything? Related reading: http://arti

Git Gerrit try to configure trivial rebase

I want to enable trivial rebase on gerrit 2.9.1. I followed documentation and changed labels. Here what I hava in MY_PROJECT.git/config: [label "Code-Review"] function = MaxWithBlock copyMinScore = true value = -2 Do not submit, I must review it ! value = -1 I would prefer that you didn't submit this value = 0 No score value = +1 Looks good to me, but someone else must approve value = +2 Looks good to me, approved ! copyAllScoresOnTrivialRebase = true copyA

Git Gerrit Application flow

In order to debug some issues with Gerrit I'm trying to understand the flow of the application. In the picture above my assumption is that in step 1 the git repo is updated, in 2 a change is created. After which the change is replicated (4) or the push is aborted (5) (the user gets a Internal Server error). Are my assumptions true? Or are these changes more transactional? Where it either does all or nothing, including updating the Git repo? Does any of you have a link to documentation where th

Edit Git alias in command line

I am using Git for windows. Right after installation, I setup some Git alias on Git bash command line. I used: git config --global alias.st status But now, I want to change the alias to diff --stat. Then, on Git bash, I typed git config --global alias.st diff --stat, but it seems to not replace the alias previously set. When I type git st it is still running git status. Of course, I can go to the gitconfig file and edit it, but I want to make the change using the command line. So, is there a

Creating a bare repository on a Git server remotely

Is there any way to create bare repositories on a Git server remotely from my local machine? I'm trying to eliminate the annoyance of having to ssh in to my Git server and create the bare repo manually. It's probably not possible, but ideally I'd like to create local git repositories, and push them straight away to my Git server without having to create bare versions on the server first. Am I asking too much of Git?

Git: Copy Repo To New Directory To Continue Working

I've been working in directory v3 (i.e. master). I am now in a new directory, v4. While in v3, I created the branch v4. How do I bring in the .git file from directory v3 into directory v4 and continue posting to the new branch? I initially thought of cloning v3 into v4 but that clones all the source files as well. I don't need all that, just the .git file if possible.

Excluding certain files while 'git pull'

I am doing a complex PHP project with two other people. We had git setup for the project from the beginning. After working for two months, we wanted to remove certain folders (/dev/app) from git tracking ( git was already tracking them). So I deleted all the files from /dev/app and added a entry in the .gitignore file to exclude the PHP files in the /dev/app folder. **/dev/app/*.php I made a commit to the master branch. I pushed them to the origin and it was working fine. But my colleagues

Using TortoiseGit with svn-git to clone specific branches of SVN repository

I have a SVN project with following architecture (empty trunk and tags) https://svn-repo.com/svn/company +--my_project | +--trunk (empty) | +--branches | | +--my_branch | | +--my_branch2 | | +--temp_branch1 | | +--temp_branch2 | | +--temp_branch3 | +-tags (empty) I would like to use TortoiseGit to clone this repository into a git repository with branches my_branch and my_branch2 and being able to commit changes back to SVN. I have been able to clone a

Trouble creating a GIT repository in Bluemix

I am having this problem right now while coding on Bluemix: When I try to create a GIT repository after creating an application on Bluemix, I receive this message error: "Impossible to connect at IBM DevOps Services. Try later" Is this problem known to someone? Thank for answers, Alessandro

Using a repo inside a repo github

Hi so this question has probably been asked before but since I am unsure of the terms to use I cannot find the answer. So I have a github repo A which contains data structure classes and is incomplete. I want to access it in repo B and repo C. Is there a way I can go about doing this so that i can keep updating repo A and testing it in repo B and C. Sorry for asking what i assume is a redundant question I am just unsure of what I am supposed to be searching and I keep finding things that are not

How to identify what exactly happened in the git difftool output

I used git difftool to get the diff in between 2 commits in context format by using git difftool -y -x "diff -c" $1 $2 >>./tempFiles/diffAll.txt here $1 and $2 are two commit hashes which are passed as command line arguments to the shell script containing the above code. In the context format as mentioned in here, we can easily identify the lines which are modified ( with ! mark), added (with + mark) and deleted( with - mark). part of the output I got from the above is as follows (from

it fails when git-receive-pack has new line in return

I am trying to response to a git-receive-pack request, so if my program return 009c0000000000000000000000000000000000000000 capabilities^{}report-status delete-refs side-band-64k quiet atomic ofs-delta agent=git/2.10.1.(Apple.Git-78) it works and git clients like smartgit will work as well but when the return value has a new line (\n) with 0000 in response just like standard 009c0000000000000000000000000000000000000000 capabilities^{}report-status delete-refs side-band-64k quiet atomic ofs-d

Git How to keep ignored files when switching to branch not ignoring them?

I'm trying GitHub pages with a webpack project, so I made a new branch (forgot to use --orphan) and keep different files in them. On master branch, dist/ directory is .gitignored. On gh-pages branch, all files are ignored except for dist/, index.html and some other files. When I npm run build on master, the new dist/ is built, but it is overwritten by the former dist/ when I checkout gh-pages. How to keep them and make it possible to add and commit them after?

Git Commit Issue : Updated File not Push

Issue is , My Previous comiit have one zip file which is very large therefore it will not successfully push. but after delete this file whenever i make second commit then previous commit zip file also consider inside that. Previously i commit and Push files and folder but inside that one 7 Gb zip file is also there so that File push is not completed. therefor i removed this zip file and try to push again but its also consider this zip file . Anyone have an any idea please share with me.

How can a file be committed with CRLF on git?

I have a repository containing 5 files that have been committed with CRLF. I don't know how this happened, but on a clean checkout if I use this command it prints 5 files (out of hundreds): git grep -I --files-with-matches --perl-regexp '\r' HEAD Does anyone know how can I reproduce this issue? In other words what is a set of git settings that can lead to this situation?

Git Fork versus branch for an addon that target mutliple version of a product?

I'm building some addons to a commercial product. My addons can target multiple versions of the commercial product. Each version of the addons has slight differences. Around 95% of the code is identical. There are few features that require specific version of the product, and some path has to be changed between versions. I'd like to store my sources in a git repository but I don't know if I should handle versions of the addon in separate branches, or in separate forks. 1st approach: one re

http auth does not work with TortoiseGit

Every time I try to clone any repo with TortoiseGit from our remote gogs repo I get 401 (Unauthorized). Using http://user:pw@ex.ample.com/user/repo.git as checkout url does not work either. ssh is not an option. Everything works with http auth disabled. simplified nginx config: server { listen 80; listen [::]:80; server_name ex.ample.com; location / { auth_basic "Restricted Content"; auth_basic_user_fi

Azure DevOps git policy configurations api broken?

I'm trying to pull policies from the git/policy rest api following this article: https://docs.microsoft.com/en-us/rest/api/azure/devops/git/policy%20configurations/list?view=azure-devops-rest-5.0 When I invoke: https://dev.azure.com/{organization}/{project}/_apis/git/policy/configurations?api-version=5.0-preview.1 I get a response of: {"count":0,"value":[]} There are branch policies defined in the project I was trying. Interestingly if I try the policy/configurations api: https://do

How to sync up my local git repo and delete branches that are gone in remote repo

I have seen many somewhat similar stackoverflow questions regarding this. I have tried many ways but am still stuck. I have a script like this: git fetch --prune for k in $(git branch --merged| grep -E -v "(^\*|master|dev|release|origin)"); do if [ -z "$(git log -1 --since='38 week ago' -s "$k")" ]; then ## Info about the branches before deleting git log -1 --format="%ci %ce - %H $k" -s "$k"; ## Delete from the remote # git push origin --delete "$k"; ## Delete the local

git apply patch doesn't work: no such file or directory

Our repository was moved from GitLab to GitHub. I need to migrate some changes from my old working repository to the new one. I have two separate clones. I ran: git format-patch a3f98d38410c48be73a5fb4a6fa086c29ed6a7c1 --stdout > dan-changes.patch to create the patch file, then moved it to the other clone. Then: C:\Users\dbak\Projects\Flamenco.Flamenco-Firmware (dev-anom-stiction-test -> origin) λ git apply -v dan-changes.patch dan-changes.patch:793910: trailing whitespace.

Git Creating a branch on bitbucket.org and checking it out deleted my code

So I created a repo on bitbucket, tried to push my local code on my laptop to it, but it keeps writing this error: To https://bitbucket.org/username/repo.git ! [rejected] master -> master (fetch first) error: failed to push some refs to 'https://username@bitbucket.org/username/repo.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first i

MINGW64 (Git Bash) interactive rebase opening a bizarre version of Vim?

I'm running MINGW64 on Windows 10. I'd like to change the names of some of my previous Git commits a la this StackOverflow answer. Git's been working great so far, and I can also run Vi/Vim through MINGW64 with no issues whatsoever. The problems begin when I enter the command git rebase -i HEAD~1. I get this bizarre version of vim that doesn't seem to respond well to traditional Vim input. I hit the Esc key to navigate with arrows or with h, j, k, and l. But instead of navigating, it either ove

Git does not recognize/list the branches of my repo

I have a project with two branches yet. Now I created a third branch and I want to push code from new folder in it. I started with git init then git clone ssh-adress so I'm actually connected to my project. But now I want to show the branches from the project with git branch --list or swith the branch git checkout name. But I either get just nothing with the list or I get this error when trying to switch the branch: error: pathspec 'name' did not match any file(s) known to git. So Im wond

Git: working file is different than last commit without having any commit for the changes

I have a file where: The previous version of the file, with commit (ABC for example) is correct however the current (working file), compared to the previous version (using gitlens on vs code), lost many changes that I want to keep. The problem is that I want to find & revert the commit that made the wrong changes (the one that affected the working file) but the last commit I can see for the working file is (commit ABC, which is the correct version) How do I get the commit (or merge commit

Use part of git commit message as a variable in git log

I'm trying to create a more useful list of commits for reporting, and would like to format commit messages made in the following format: Merged PR 5678: [12345] here's my awesome git commit message Into the this format: 12345 - 2020-06-02 - Merged PR 5678: [12345] here's my awesome git commit message - Joe Bloggs What i have so far: git log --grep=Merged --pretty="%ad - %s - %an" --date=short Which returns: 2020-06-02 - Merged PR 5678: [12345] here's my awesome git commit message -

git clone does not download all files

When I fire the below command: git clone <url> I can just see 1 folder and in that folder just 1 file viz .gitkeep. Why my other folders and files arent getting downloaded?

Terraform Kubernetes service definitions in individual git repositories?

Is there a recommended pattern or solution for keeping the definitions of individual Terraform services in their respective code repositories while still being able to update the entire project's infrastructure at once? We're migrating to GCP from a managed service and already use Github+Actions. I was thinking of doing this a couple different ways, either through private Terraform Modules on GCS or using git submodules. While we could use a single central repository for all Terraform files, I w

Do you have any idea why my contributions using gitKraken won't show up on my gitHub account?

so I'm logged in to gitKraken using my github account. I have 2 email addresses associated to my github account and I'm connected to gitKraken using my github account (using eventually my primary email address). I've just discovered recently that my contributions using gitKraken didn't show up neither in the github projects nor in my github profile. It's like a non-existent user as you can see in this picture showing the network graph of one of the projects: network graph showing non-existent us

Git Is Azure Repos private repository "safe" to use?

I am looking for a tool to create private repositories. I am using VS community 2019 and it integrates with azure repos easily. I enjoy the service and ease of use but I cannot find reliable information about Intellectual Property and "safety". Is Azure Repos safe to use? Meaning - can I be quite confident that my code will not be stolen/visible in public? I have set the repository to private but I am not exactly sure if that is enough (I'm new to version control and repositories). How

  1    2   3   4   5   6  ... 下一页 最后一页 共 431 页