Category : Git have tutorials for Git, here you can study articles of Git, Git posts collection, most popular and useful tutorials of Git, here you can find list of all relevant posts and example about Git, we have lists of tutorials and examples about Git.very simple and quick example collection of Latest Git category.

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 | | 16675 Viewer | Category : Git

Solved - fatal: Failed to connect to 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 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 '': Failed to connect to 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 | | 31370 Viewer | Category : Git

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 | | 15456 Viewer | Category : Git

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 | | 14685 Viewer | Category : Git

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 "Haresh Patel" git config --global "" 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 | | 14366 Viewer | Category : Git

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 </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 | | 20548 Viewer | Category : Git

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 | | 14565 Viewer | Category : Git

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 | | 15205 Viewer | Category : Git

How to revoke 'git add' before 'git commit' ?

Sometimes you need to undo your git file before you git comment command. Because you made a some misteck or wrong code and you did git add using "git add ." command then you think how to undo your code before git commit command. But you can do that using git reset command, if you need to undo all file Or you may need to undo just one then you can do using git reset command, you can see bellow command. <strong>Example:</strong> <pre> // For Spesific file git reset <filename> // For all files git reset </pre>

By Hardik Savani | February 28, 2016 | | 15308 Viewer | Category : Git

How to remove current changes from local system in Git ?

Git remove all current changes, if you did some wrong code in your project and you want to remove from git. then you can simply remove by git checkout command.i mean you did changes in your local system from git. you can use this command. <pre> git checkout . </pre> Try this..

By Hardik Savani | January 9, 2016 | | 13056 Viewer | Category : Git