I’m newbie to git. I have a repository on bitbucket. Now I want to download it on my computer at work and make some changes on the project, then push it again. First of all I initialized the git on a local directory by this line: $ git init Then I set something configuration: $ […]
Is there any way to list all octopus merges in a git repository using git commands (e.g. git log …)?
After editing my code, git checkout — . works for undoing my edits. The same command, however, doesn’t work for undoing the changes made by git checkout [revision] . – I need git reset –hard; in that case instead. Can anyone explain why the inconsistency?
I’m trying to migrate perforce repository to Git using git-p4 tool, but struggling with branch configuration. Consider the following P4 layout: Folder1/ — SubFolder1/ — SubFolder2/ Folder2/ file1.txt file2.txt Here, I need to migrate SubFolder1 and SubFolder2 as a separate branches, while keeping Folder2, file1 & file2 in master branch. I tried specifying the following […]
I have a directory with 10 git repos. I would like to do git pull on all of them, in parallel, in a single command: gpa // git-pull-all This should actually do the following: cd c:\repos; foreach $dir in `ls -d` do git pull & // unix version for background cd .. end This should […]
I’m constantly facing authentication issues as a consequence of moving between pushing to my private projects and my work ones. Each time I move from a work context to a personal one, I spend some time dealing with my ssh keys and configuration. I often go through the github documentation around generating and adding ssh […]
I am not able to pull a file remotely from git server through php. I wrote the following BAT code and am trying to execute it via php. the batch file git1.bat is a follows: cd C:\repos\rep2 && git pull origin master 2>&1 the php code: <?php echo shell_exec(“C:\\xampp\htdocs\AS-otg\\git1.bat”); ?> the output I get: However, […]
Whenever I am trying to contact remote repo in git, I am getting bad response error(400). So, I did verified remote fetch and pull url’s. git remote -v // Those seems to be okay. git config –global –edit user.name git config –global –remove-all user.name I verified global configuration on cmd prompt and It seems “user.name” […]
I fear I already know the answer but here goes anyway.. I accidentally clicked “Discard All Changes” in VS Code (OSX) and now a month’s worth of work is gone. Poof’d. Thing is, I didn’t have GIT properly setup so I hadn’t done any commits yet. Is there anyway I can get my work back? […]
When I try to deploy a jingo repo to Heroku, the app fails to launch. I investigated the logs using heroku logs -a myapp and discovered that the fatal error occurs during the construction of the Git object in the lib/gitmech.js script. Specifically it fails when the constructor tries to call fs.statSync(gitDir) with: Error ENOENT, […]