Tag : Git


How to git ignore file permissions changes for commit?

When i was working on my PHP Laravel project and i clone project from git repository. I just composer install and then change storage folder permission. then i just run bellow command: <pre> git status </pre> I found list files of storage folder even i didn't changes on that file. I was thinking why there are several files on git status. But i understand this is because of permissions. I search google and other, at last i found bellow command that way we can ignore or remove or undo file permissions changes from git status. So, you can run bellow command in your repo. <pre class="prettyprint .....

By Hardik Savani | September 1, 2016 | | 652 Viewer | Category : Git
READ MORE

Solved - fatal: Failed to connect to bitbucket.org port 443: Network is unreachable

When i was working on my project repository i found error "fatal: unable to access 'myrepo' Failed to connect to bitbucket.org port 443: Network is unreachable" few day ago. when i going to just git pull command i found error like as bellow: <pre> fatal: unable to access 'https://hardik@bitbucket.org/hardik/setup_backend.git/': Failed to connect to bitbucket.org port 443: Network is unreachable </pre> But i try to solve it but nothing, at last i found solution i was use <strong class="path">HTTPS</strong> for clone repo. But i need use <strong class="path">SSH</strong> for git repo. So i chan.....

By Hardik Savani | July 21, 2016 | | 6491 Viewer | Category : Git Bitbucket
READ MORE

How to add git add remote origin on bitbucket repository ?

when i was working on my laravel project with my friend. both are working on same project, when i changed on many files, he don't know and he changed name of repository on bitbucket and i couldn't push any thing, i told him. He know how can we resolve this issue so i remove my old remote and added new remote url on my existing repository. Finally, i solved my issue, if you also fetch issue like i had then you can just follow bellow command and solve. <strong>Terminal Command</strong> <pre class="prettyprint lang-php"> git remote -v git remote remove origin git remote add origin Bitbucket_Rep.....

By Hardik Savani | July 12, 2016 | | 826 Viewer | Category : Laravel
READ MORE

Solve - fatal: Unable to create '/myproject/.git/index.lock': File exi

When i was working on my laravel 5 application, i did all the changes i did but when i had gone for push then i found this fatal error. It's not able to create index.lock file in .git folder. I also give full permission to .git folder and also try to remove direct index.lock file from .git directory but same error like as bellow. <strong>Error</strong> <pre> fatal: Unable to create '/var/www/me/theme_backend/.git/index.lock': File exists. </pre> But at last i found how can i resolve this problem, just run bellow command and it will work. <pre class="prettyprint lang-php"> rm -f ./.git/index.....

By Hardik Savani | June 29, 2016 | | 547 Viewer | Category : Git
READ MORE

How to find deleted file in git repo history log?

Onetime i was need to check which files i deleted before, When i was working on my laravel application. I was try to find how to show deleted files log from git command. But at last found git command from google search. we can view all deleted file log from our git repository. So, let's fire bellow command. <strong>Command:</strong> <pre> git log --diff-filter=D --summary </pre>

By Hardik Savani | June 10, 2016 | | 498 Viewer | Category : Git
READ MORE

How to set git config username and email?

When you first time create your git repo or clone project from git repo then you must have to set username and email. You can also set global username email and also you can set per repository username email. So, in this post in bellow command through you can set global git username and email. <strong>Global Set:</strong> <pre class="prettyprint lang-php"> git config --global user.name "Haresh Patel" git config --global user.email "itsolutionstuff@gmail.com" git config --list </pre> You can also set username and email per project repo using bellow command. First you have to go on your projec.....

By Hardik Savani | May 19, 2016 | | 616 Viewer | Category : Git
READ MORE

Git - error failed to push some refs to git resolve?

I fetch this error i was working on my php project and when i need to add that project on my bitbucket account. so first i create repository on my bitbucket account and clone that repo. but when i push first time my projects i found following error: <pre> error failed to push some refs to https://infotech@bitbucket.org/infotech/mycollege.git </pre> I did try many to solve bellow issue, but i can't found proper solution at last i did try my own to git add like this way : <pre> git add -A git commit -m "setup project" git push origin master .... </pre> And Solve my issue, you can try this if y.....

By Hardik Savani | April 9, 2016 | | 1071 Viewer | Category : Git Bitbucket
READ MORE

How to git force pull from remote branch ?

When i was working on my Laravel application using git bitbucket repository, i fatch problem when first i did commit on my master branch and i think i did 3 or 4 commits, and my project partner pull also in his local system ,but we did wrong code in this commit so we required to remove that 3 or 4 commit from my bitbucket repository. he did remove that commits from his system but when i did pull but nothing to change, i also remove cache but same. But At last i though i thing i have to hard pull that's why i fired following command. if you also fatch problem like this then let's see this comm.....

By Hardik Savani | March 18, 2016 | | 657 Viewer | Category : Git
READ MORE

Git remove last commit from local

Git is distributed version control system that is a awesome. when ever you are working with git repository. if you did commit your code in your local system by mistake, then if you want to remove last commit from your project. so let's see following example: <strong class="example">Example:</strong> <pre class="prettyprint lang-php"> git add . git commit -m "change for test" git reset --soft HEAD~ </pre>

By Hardik Savani | March 18, 2016 | | 667 Viewer | Category : Git
READ MORE

    Laravel 5 - How to convert file(image, audio, video) extension using CloudConvert?

    Laravel 5 - How to convert file(image, audio, video) extension using CloudConvert?

    Open Post

    MySql comma separated column join in PHP Laravel 5

    MySql comma separated column join in PHP Laravel 5

    Open Post

    How to get location information from ip address in Laravel ?

    How to get location information from ip address in Laravel ?

    Open Post

    How to upload image with validation in PHP Codeigniter?

    How to upload image with validation in PHP Codeigniter?

    Open Post

    Laravel 5 notification alert using bootstrap notify plugin example

    Laravel 5 notification alert using bootstrap notify plugin example

    Open Post

    Laravel 5 Ajax CRUD with Pagination example and demo from scratch

    Laravel 5 Ajax CRUD with Pagination example and demo from scratch

    Open Post