Questions tagged [git]

45501 questions
0

votes
1

answer
14

Views

How to make GIT local match remote (as if just cloned)?

I've deleted a bunch of BitBucket branches. I want my local to reflect that without having to manually delete each branch. I should be able to do something to "just make my local match my remote as if I just did a fresh clone." edit: I don't want some several step script to grep and search things, n...
Art Vandelay
1

votes
2

answer
396

Views

git merge branch overwriting destination

My repository have a master and dev branch. At this time I wish merge the dev with the master, or better, not a merge, but total replacement the content of the master branch with the dev. Is it possible, and how you would do it with git commands?
ghiboz
1

votes
1

answer
2.3k

Views

can't clone repo from remote - ssh keys identification error

I'm on Windows and I'm using Git Bash. I want to clone remote bare repository. Supposedly I've set up ssh keys correctly, because I can access server through ssh protocol. I've tested it by trying to get a list of directories on server: $ ssh [email protected] ls It asks for passphrase: Enter pass...
1

votes
2

answer
157

Views

Git search history and show diff

git log -G searches history for diffs containing an expression, but it only outputs the commit message for each diff found. Is there a way to do this but also output the actual content of the diffs?
rwallace
1

votes
3

answer
80

Views

Git 'merge' by creating a new checkin based on another branch

I have a git branch, dev, that is exactly where I want my other git branch, master to be. master has some hotfixes on it that are further in the future than the common ancestor of both so this command chain creates complicated and silly merge conflicts: git checkout master git merge dev # Complicate...
SimplGy
1

votes
2

answer
357

Views

Grant access to a single file on github

I'm just searching for a possibility to grant access to another developer to one single file in my git-repository. Is there any way except of submodules/subtrees? It's just the localization-file which should be translated by an other person. Looking forward for your responses! Thanks! Sebastian
Sebastian
1

votes
1

answer
1.9k

Views

How to list only version tags with git-log?

I want to create a (latex) table of tags and theirs messages straight out of git, therefor I need to get all tags that match a pattern like: /^v([0-9]|\.)*/ or so. How to do this? My attempt: git log --all --tags --grep="^v([0-9]|\.)*" --pretty=format:"%d & %s & %b" fails and returns nothing (tested...
musicmatze
1

votes
1

answer
1k

Views

Git instaweb on windows? got a error

Is it possible to use instaweb on windows? I have a bare repository at D:/myrepo and I want to use instaweb to see it like this I have tried this command git instaweb --httpd=webrick But I got this error git: 'instaweb' is not a git command. See 'git --help'. Thanks in advance.
Andres
0

votes
2

answer
23

Views

How to get a list of commits related to a specific release?

I need to get a list of commits between two releases of a library from a git repository. Let's suppose we have the following releases: 3.0 (4 commits since 2.11) 2.11 (12 commits since 2.10) 2.10 (20 commits since 2.9) 2.9 (and so on...) I want to do something like: git log -release "3.0" then outpu...
Maigret
0

votes
0

answer
5

Views

I made changes to a local file in a Branch and did a commit but didn't push to the origin. How can I get the original file back?

Here's what I have: MacBook:Ja.git alan$ git status On branch alan-1 Your branch is ahead of 'origin/alan-1' by 1 commit. (use "git push" to publish your local commits) nothing to commit, working tree clean Is there anything I can do on the command line or with the Visual Studio options that will al...
Alan2
0

votes
0

answer
6

Views

Bitbucket groovy conditional script

Team - I like to enable one condition to restrict pull request in bitbucket. Condition - The feature branch should always merge into develop and pre-prod branch before raise pull request to release. If condition fails then it shouldn't allow user to raise pull request. We are new to bitbucket and...
Vimal
1

votes
2

answer
138

Views

How to upload changes from development branch to remote branch on GIT?

I'm working on one of the cakephp website, where i use git as a version controller. I have 2 types of different branches are there : 1) development 2) ui When i try to push my latest changes from development to ui branch using this command : git push web ui, below message will displayed. Counting...
Chandresh
1

votes
1

answer
77

Views

Task management tool that can link a task to specific part of code?

I'm looking for a task management tool that would allow me to do something that seems really obvious to me: link a task/issue to a specific part of my code (using Git). Here is an example of what I'm expecting from this tool : I click on "new task" In the task creation, I can set the title, the desc...
David D.
1

votes
1

answer
110

Views

What is the parallel of clearvtree in git?

I have used clearcase. We have clearvtree command to show the version tree of a particular file. Is there a command in git to show the version tree of a file, visually?
a3.14_Infinity
1

votes
1

answer
40

Views

How to get all remotes urls from remote git repo?

For example, let we have a git repository A, which have two remotes: [email protected]:~/dev/tmp/some_repo$ git remote -v remote_a /home/user/dev/tmp/a/ (fetch) remote_a /home/user/dev/tmp/a/ (push) remote_b /home/user/dev/tmp/b/ (fetch) remote_b /home/user/dev/tmp/b/ (push) I wa...
Frederic Blase
1

votes
2

answer
78

Views

Adding a remote do we call the remote name origin or upstream?

git version 1.8.5.3 Hello, I have been using git for sometime now, and I have always cloned from another repository. When I clone from a repository the default name for the remote is always origin. However, I have created a new repository in my dropbox and initialized a bare repository as I want to...
ant2009
1

votes
2

answer
89

Views

Update my git branch with commits in another branch

My question is probably a simple one, but I am relatively new to using GitHub and wanted to check before I do anything wrong. Basically, I am working on a feature branch which was cut from the develop branch. I am still working on my feature branch, but another dev has pushed some changes to the dev...
James
1

votes
1

answer
258

Views

“Visual Studio Online” for 2010 version?

I am talking about the Visual Studio Online Source Control service by Microsoft. They now support Git as well. I know they work fine on VS 2013, but is there a way to get it to work on 2010? It worries me on using their service because what if a new vs studio release, such as vs 2014, and then I wo...
JohnC1
0

votes
0

answer
8

Views

Git Error when try to pull from Git master branch in Katalon Studio

I'm facing issues when try to pull from Git master branch. Here is the Error screenshot Katalon build on top of the Eclips IDE so any help regrading this issue in Eclip as well ?
Mehran Shafqat
0

votes
0

answer
4

Views

What if there is a process named as self-branch code review in the Git flow?

I always look forward to a process within Git flow, where reviwers can have code review in a certain branch by selecting specific commits, also like giving comments in certain commits. However, comments are always not keepable when commits are covered, and it is also hard to trace back the discussio...
PuiMan Cheui
1

votes
3

answer
95

Views

Does Git somehow stores the list of child commits efficiently

A Git commit object just stores the author, date, message, parent commit hashs and the root dir hash. So, if I want to find out which childs of this commit exist (of course considering only a single repository), how does Git do that? Basically this. But how does Git do that internally? How efficient...
Albert
1

votes
1

answer
785

Views

Git Blame: View all Lines Authored by Specific User

Can git blame be used to view all lines in the current codebase committed by a single user?
Austin
0

votes
0

answer
10

Views

Adding local jar (oracle driver) to Maven and Bamboo

I need to use the oracle database driver (oracle.jdbc.driver.OracleDriver) for a project but Oracle does not have a Maven repository for it, so the only way that I have found is to download it onto my machine and then "install" the .jar to Maven as seen in this article. However, now it is time to ad...
Dylan Kidd
1

votes
1

answer
1.4k

Views

Is there any git bash with nice interface for Windows? [closed]

Recently started git in bash, after understanding the basics of code mode, but found it feeling bogus using git with a command prompt-like interface of Windows. I'm wondering is there any easy way I can change the default interface to something cool! What I can most is to use the "Properties" menu a...
Mayeenul Islam
1

votes
1

answer
642

Views

Pull one file from Git without having to clone the entire repository [duplicate]

This question already has an answer here: Retrieve a single file from a repository 18 answers I have a Git repository named "test" inside which I have four files and sub-directory named "test2". So the path would be /test2/file.txt I would like to pull (remotely) just the sub-directory with all o...
yathrakaaran
1

votes
1

answer
393

Views

How do I search git history for detached heads?

I accidentally added a commit to a detached HEAD state and then I checked out master again. I no longer have the commit hash, so I can't just check out the commit. Instead, I am trying to search my git repo for all commits that I made in the last few days so that I can find it. Is there a command...
Andrew Eisenberg
1

votes
1

answer
496

Views

How to remove remote branch and its commit history from git?

I am trying to delete the remote branch that i created for testing purpose and this command does the trick: git push origin --delete test However in my git gui I can still see the commit log message for that branch. How can i delete the commit history? There was only one commit made for this branch.
Neela
1

votes
1

answer
440

Views

Where to store private keys for a continuous integration (CI) deployment?

I'm building a continuous integration deployment that is based off a private git repository. My project contains an un-versioned PK file in the resources directory. This works fine when I deploy manually, I ensure a copy of the private key is on the path from whatever workstation. Now that I'm deplo...
Sam
1

votes
1

answer
2.4k

Views

git rebase -i foo/dev gives noop

When I try to get into the interactive rebase mode as explained here, all I'm getting is noop which is weird but I cannot figure out why. I am inside a temp branch in my machine and when I try to view the difference between, I get this: [email protected] /D/Dropbox/AppsPublic/gulp-aspnet-k (temp-a)...
tugberk
1

votes
1

answer
153

Views

How to maintain code so that it can be used in multiple software?

I need to understand the best practices to use the same source code/libraries into multiple applications. The requirement is, e.g. I am selling my code/library to some company, lets say xyx, then I should use xyz as company name in my packages(and other places if required). Later, if some other com...
Dev_Vikram
1

votes
1

answer
41

Views

How to “reset” master to follow HEAD again after `git symbolic-ref`

At some point in the past, I've set master to follow my other branch, like this: git symbolic-ref refs/heads/master refs/heads/my-other-branch I want to go back to the state where master just tracks HEAD as usual. Can I just paste the most recent SHA1 into .git/refs/heads/master?
Borek Bernard
1

votes
1

answer
691

Views

Git: pull from remote but keep local commits

For example: there is a local and remote repo with two files: 1.txt 2.txt Developer #1 edits 1.txt locally and commits the changes without pushing them to remote repo. Later, developer #2 sends pull request with edited 2.txt, and it gets merged in main remote repo. My question is: how can developer...
Marvin3
0

votes
0

answer
3

Views

Gerrit does not allow to clone repository

I have upped gerrit locally, created an admin user and have tested ssh connection through "ssh -vv -p 29418 [email protected]". I also created a project "ssh -p 29418 [email protected] gerrit create-project spring-petclinc.git", but I still have no option to clone repo from UI. What shoud I configure to...
Alex
1

votes
3

answer
1.2k

Views

clone git from local machine to my server?

I have my project on my local machine, with git versioning. I buy server, I install git, now I want clone my local project to my server (exactly the opposite of what we do generaly). I don't have gitlab or github here. How can I do that? How download my local git project to my server? EDIT: solutio...
Matrix
1

votes
1

answer
2.1k

Views

sublime text - coloring files according to their revision status

Other editors, such as PyCharm and Atom offer a feature where files are colored differently according to their status on git (one color marks a file as modified, another as unrevisioned, etc.). This is an extremely useful feature. Is there a way to get that on sublime as well? The two other editors...
yuvi
1

votes
1

answer
305

Views

How to reset to the state before a given git commit?

I have a big repository with some-hundred commits. Given is the hash to a specific commit deep in down the history where something was fixed. I know that I can revert to that commit by using git reset 56e05fced214c44a37759efa2dfc25a65d8ae98d However, I want the state BEFORE that fix was applied, i.e...
schrobe
1

votes
1

answer
1.9k

Views

Translate authorized curl -u post request with JSON data to RestTemplate equivalent

I am using github api to create repositories using curl command as shown below and it works fine. curl -i -u "username:password" -d '{ "name": "TestSystem", "auto_init": true, "private": true, "gitignore_template": "nanoc" }' https://github.host.com/api/v3/orgs/Tester/repos Now I need to execute th...
john
1

votes
1

answer
940

Views

How to create a new 'Local' remote repository for an existing project with Git

I have just started a new git project that is so far stored on my local Mac. Now that the project has a few revisions checked into it, I would like to push these changes to a network location (I have a Time Capsule in my local network, where I wish to maintain the master copy of all my code, instead...
Zephilim
1

votes
1

answer
387

Views

Webpack and git in multi user mode

A little team with 3-4 developer with access to same files. After each fix/update - and commit/push to server - other developers (on pull) have a problem with non-stop "merge conflict" in rebuilding bundle,chunk etc. How to easy solve this problem? Of course - other developer (not user of webpack &...
Vladislav
1

votes
2

answer
1.1k

Views

Why are there conflicts when I have no changes?

I'm trying to understand Git, I'm pretty new to it. I have a fork on Github that I forked from someone else's repository and I'm trying to contribute to his repository. I do my changes and I'm happy so I want to do a pull request. But I can't do the pull request because Github for Windows says it...
Dallas

View additional questions