Posts

Showing posts with the label git

Git does not show change even the file changed

Git does not show change even the file changed Is git broken or what are we doing wrong ? ;-) We found out, that a file was changed in a recent version of the git repository and I tried to figure out when that was using whatchanged . whatchanged How can this be: $ git checkout 27773b72432e86d308d25d666663f237e50aa3fd Tools/foo.php $ md5sum Tools/foo.php 85552061cae9832c11eb6607ac88e3d8 Tools/foo.php $ git checkout master Tools/foo.php $ md5sum Tools/foo.php f38f51232785a432af2d1bd8db4429ed Tools/foo.php BUT: $ git whatchanged 27773b72432e86d308d25d666663f237e50aa3fd..master | grep foo.php # empty result How can this be? You can configure git to ignore line endings for one thing. I don't think you can make md5sum ignore them :) – Mad Physicist Jun 29 at 15:37 It's not line endings. It's a real code c...

Adding Android Studio Project to new git Repository

Adding Android Studio Project to new git Repository I create a new repository from bitbucket and create new android project want to add in a new repository but whenever I do the old android bitbucket project added to new repository along with the new Android project, I want only one project with one repository, I tried all nothing is working, I have also changed url from git bash but whenever I add, commit and push project from android studio, it also show old project hierarchy in push window and it pushes to new repository. I don't want to add old project with new repository. I tried many command rehead,rebash etc etc..any help will be appreciated What is the directory structure of your two projects? I mean, are both projects in the same directory? Does that parent directory have a .git directory? (Be sure to "show hidden files" in order to check.) – Code-Apprentice Jun 29 at 18:11 ...

Git error, need to remove large file

Git error, need to remove large file I am getting this error when I try to push to git and I have no idea how to fix it. Counting objects: 1239, done. Delta compression using up to 4 threads. Compressing objects: 100% (1062/1062), done. Writing objects: 100% (1239/1239), 26.49 MiB | 679.00 KiB/s, done. Total 1239 (delta 128), reused 0 (delta 0) remote: warning: File log/development.log is 98.59 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com. remote: error: Trace: efd2d13efa4a231e3216dad097ec25d6 remote: error: See http://git.io/iEPt8g for more information. remote: error: File log/development.log is 108.86 MB; this exceeds GitHub's file size limit of 100.00 MB remote: error: File log/development.log is 108.74 MB; this exceeds GitHub's file size limit of 100.00 MB remote: error: File log/development.log is 108.56 MB; this exceeds GitH...

Getting “error: no such commit” when trying to restore a deleted branch?

Getting “error: no such commit” when trying to restore a deleted branch? I have already committed a file in Gerrit(pushed it), but I think, I, unfortunately, deleted that branch locally from which I committed. How to fix that? Please help. I tried git branch --contains 31436fd7200566967f85bfb1ee5425f9b599b908 but it shows error: no such commit 31436fd7200566967f85bfb1ee5425f9b599b908 Edit: Yes I've git installed locally and I worked on the branch locally. I got commit id from the Gerrit site, I've committed. Okay, two days ago first there was a problem when I tried to commit the change, say A. I tried to submit it using "./logerrit submit master" but all I got was: Counting objects: 32, done. Delta compression using up to 4 threads. Compressing objects: 100% (32/32), done. Writing objects: 100% (32/32), 100.46 KiB | 0 bytes/s, done. Total 32 (delta 22), reused 0 (delta 0) remote: Resolving deltas: 100% (22/22) remote: Counting objec...

I am not able to pull master branch details using the git hub rest api url

I am not able to pull master branch details using the git hub rest api url I am trying to pull all the git branch details using git hub rest api. But it was not pulling all the branch details.Even I don't see master branch details also. PFB the url I used to fetch the branch details: GET github.com/api/v3/repos/:repo/branches GitHub and GitLab have different APIs: pick one tag and stick with it. Don't use the api tag at all (it says so right in its pop-up info!). Git itself does not have a REST API. Since you mention GitHub in the subject and body, I'll pick that as the tag to keep. And in general, see Minimal, Complete, and Verifiable example - you provided a sample GET but not what you expected vs what you actually got. – torek Jun 29 at 14:32 GET ...

Your push would publish a private email address error

Image
Your push would publish a private email address error I'm very new to Github/VCS. When I try to share my project on Github, I get the following error message. Can't finish GitHub sharing process Successfully created project 'myproject' on GitHub, but initial push failed: remote: error: GH007: Your push would publish a private email address. failed to push some refs to 'https://github.com/me/myproject.git' I've googled the error message, and got no hits. I've also searched stackexchange, but no cigar. Any ideas on how to solve this issue? I removed references to pycharm as the error has to do with github and not pycharm. – Burhan Khalid May 9 '17 at 7:26 4 Answers 4 I experienced the same error: GH007 m...

Get pull request info on trigger with multiple VCS roots

Get pull request info on trigger with multiple VCS roots I have a TeamCity (version 2017.2.4) project with multiple configurations which are attached to various GitHub repositories. Now I would like to setup SonarQube GitHub plugin for some of these configurations. To do so, I've created a new build and attached a VCS Trigger . In order to make this trigger work, I also attached all VCS roots which I'd like this build to run on. Now after any changes in these VCS roots, the build gets triggered. VCS Trigger In order to use this plugin, after each trigger I need to extract repository name which was affected and fetch the pull request id. This is easy to do if I have a single VCS root with the following script: #!/usr/bin/env bash # Exit script on any command failure. set -e # Pass parameter to next TeamCity build step. param() { echo "##teamcity[setParameter name='$1' value='$2']" } # Full GitHub repository name. repository="myOrg/$(echo '%...

How to edit stored procedure in migration transparently?

How to edit stored procedure in migration transparently? I have a migration in Laravel project, that creates a stored procedure in the database. It looks nice the first time I create this migration. But if I want to change an existing stored procedure, I have to create a new migration, containing the new version of the procedure code. It works, but it doesn't allow to make and see clear diff 's in git . diff git Here is an example migration: use IlluminateDatabaseSchemaBlueprint; use IlluminateDatabaseMigrationsMigration; use IlluminateSupportFacadesDB; class GenerateReport extends Migration { public function up() { DB::statement(<<<SQL CREATE OR REPLACE FUNCTION myfunc() RETURNS void AS $func$ BEGIN COPY (SELECT 1) TO '/tmp/myfile.tmp' BINARY; END $func$ LANGUAGE plpgsql; SQL ); } public function down() { DB::statement("DROP FUNCTION myfunc()"); } } My question - is there a way to work with migration...