0
votes
3answers
24 views

Is there any way to make git not commit a special file anymore?

Sometimes, I don't want to commit a special file after the first commit, for example conn.php which contain my mysql username and password, I can change it at first and commit it, and change it back, ...
0
votes
1answer
24 views

Committing a project commits to the solution, why?

Whenever I commit a project in a solution, if I go to a Git Bash and do some git log, none of the commits are present in the project folder, however they're all present on the solution folder. How is ...
1
vote
1answer
37 views

What is the purpose of committing a solution?

While looking at the available options for committing to Git in Visual Studio 2013, I've seen that one can commit a solution. I did a quick test with a small solution, the option to commit the ...
0
votes
3answers
22 views

Remove a merge commit, keeping current changes

First of all, thanks for your help all :) We have had a small problem in our team. One dev had to include some changes in our development branch. Before doing so, he accidentally merged a feature ...
-2
votes
1answer
35 views

Git remove files for commit but keep them on disk

I'm really new to GIT, and I only know how to add submodules, commit and push. I don't know what is a HEAD, neither a branch, an origin, a master. I want to upload files to the server but the problem ...
1
vote
0answers
32 views

git for multiple linux users

I have a specific question about the git file, "COMMIT_EDITMSG". I have a setup where three linux users have access to the same repository. The repository was initialized with the following commands: ...
0
votes
2answers
32 views

Transfer code from one computer to another via Git

I have some code I have not committed nor pushed to the branch I am working on on a local computer because the code is not working yet. However, I simply want to move that code from one computer to ...
1
vote
2answers
33 views

determining which merge commit caused a specific commit to be merged into my branch

Given the following history: master A-B-C-D-E-F \ topic G-H-I What git command can I use to determine that C caused G to be merged into master? Said another way, ignoring the ...
0
votes
1answer
48 views

How to commit files using Bitbucket API?

I want to to use Bitbucket API to commit the changes to online repo. what is the API call to use from Bitbucket API? is there any PHP lbrary available?
0
votes
2answers
29 views

List all git commits containing at least one file with .txt file extension

I am under windows 7 with TortoiseGit. I have a local git repository with several hundred commits and I would like to find all commits having at least one file ending in .txt. Is this possible? If ...
-1
votes
2answers
64 views

Changing commit message of already pushed repo

I have accidentally pushed a repo with a wrong commit message. I have followed the solutions provided on internet but it didn't change my commit message. I tried to solve the problem by creating a ...
0
votes
5answers
54 views

Verbose mode of Git pull from origin

Is there a way to show all commits like a "verbose" or "debug" function when using git pull origin master? I just want to see what changes are committed.
2
votes
1answer
29 views

See “real” commit date in github (hour/day)

Is there a way to see the date of a commit in github, with day/hour precision? Older commits appear in a "human readable" format, such as "2 years ago" instead of showing the actual date. If it's ...
3
votes
2answers
73 views

Preparing a git commit messaging before committing?

Is it possible to prepare a commit message prior to a commit, meaning that I will type my commit message before the actual commit or during the working dir so that I know what I am working on and I ...
1
vote
0answers
29 views

Xcode commit issue with git

I'm having an issue with Xcode trying to commit some changes to a Git repo. Today, I created a branch from master in order to work on future updates of an app while keeping the ability to fix the ...
0
votes
2answers
32 views

Self-training better commit practice in git [closed]

The Problem I’ve noticed that some repositories on GitHub are particular about what they consider an acceptable history when reviewing a Pull Request. Their reasoning for this is that a repository’s ...
0
votes
1answer
15 views

Pre-initialized Bitbucket repository. Visibility on past commits

I'm working on a private Bitbucket repository and I would like to make it public after removing some private files. My question is: can I prevent users to revert past commits of such repository? If ...
0
votes
1answer
47 views

Git commits not pushed

I had a local repository cloned from a remote one. I made many commits from it but stupidly delete that repository without pushing back to the remote repository. I somehow managed to recover the ...
0
votes
1answer
36 views

Discarded someone's commit by making small fix directly in site, how to bring back his commit?

Because I was in a hurry for some reason to fix a small little detail in my commit, I directly edited my commit through the site platform which discarded/removed a guy's commit which was committed ...
0
votes
1answer
43 views

Getting SVN updates from repos1 and do commit into repos2

I am accessing a SVN repository and I issue update command regularly to keep my local copy up to date with the latest changes in that repository. I am also doing modifications, and creating new files ...
0
votes
1answer
37 views

How to git clone 'git' metadata only

I have a remote repo called FOO which has the two following revisions : commit1 commit2 I have a directory 'bar' which contains all the files for commit2 but I am missing the .git directory and all ...
3
votes
2answers
70 views

How can git lose history when pushing a non-fast-forward commit?

I know that sometimes when I run git push, I get this error: error: failed to push some refs To prevent you from losing history, non-fast-forward updates were rejected Can someone give an example ...
2
votes
2answers
39 views

How to undo the wrong commit and update it back in git

I have been using git commands for my project. If I made one wrong commit and pushed into my branch. On that time, how can I update it back ? If I need to copy last three commits to new branch, how ...
1
vote
2answers
117 views

How do I revert a pushed commit back to being unstaged?

I tried searching for an answer to this, but haven't found anything that matches quite like this problem. Feel free to link me to an answer if there is one already out there. What I did was commit ...
1
vote
0answers
41 views

How to check for git uncommited changes in a script? [duplicate]

In a script I want to check that there are no uncommited changes so that I can switch to a different branch (and then switch back). What is the proper way how to do such a check?
0
votes
1answer
48 views

is it possible to allow merge but forbid directly committing in git

two branch in git, i use gitolite for Access control. branch 'dev' and branch 'main'. developers must commit to 'dev', and merge to 'main', then push 'dev' and 'main'. my problem is that how to only ...
1
vote
1answer
48 views

Git - How to move subpath to new branch and push it when server doesn't allow commit with difference id?

I have a repository with structure like this: /MyProject /Module1 /Module2 /Experimental /Module1 /Module2 In which, Experimental is contain the experimental code; I know this ...
0
votes
1answer
38 views

Git marking unchanged lines as changed

I am committing files through Git Gui, and this is what I see: @@ -1,14 +1,14 @@ -* { - margin:0; - padding:0; - text-align: left; - outline:0; /* chrome */ -} -table { - table-layout: ...
0
votes
2answers
45 views

GIT add or commit?

We are working on a project as a team. I have just cloned the project from github I have the project on my computer - wamp. I added a new file and I want to update my local. I have used the git ...
1
vote
1answer
67 views

How to link to a Git commit in Redmine after pushing

We have Redmine set up to automatically link commits with related issues if the developer properly tags if (such as #Refs or #Fixes). However, we have had some commits that were pushed to the remote ...
0
votes
3answers
86 views

gitignore settings included in commit

I'm trying to commit the right files in git, but having problems configuring my gitignore properly. I followed the instructions here to create the gitignore file (django project): # File types # ...
1
vote
1answer
98 views

git filter-branch --msg-filter to reword a pushed commit message

How can I reword the message of an old commit that is already pushed to a private remote? I want to keep the time stamps and tags. I found this command here: git filter-branch -f --msg-filter 'sed ...
0
votes
0answers
36 views

Duplicate commit on GitHub - Using SmartGit

I use SmartGit o control my repo. When I commited and pushed my project, I had a problem and closed the SmartGit, after that I realized that the operation didn´t finish, then, I did it again, but the ...
1
vote
3answers
131 views

how to add multiple files in git at the same time

This will be my first git use. I have added new files ( a lot ) to the folder/project ( git local repository). I went through online tutorials and forums and see i can do git commit -a So i ...
0
votes
1answer
29 views

Merge two commits in remote repository

Repository of one rather small project occupies >200 megabytes. Here is how the history looks like: ... 1) regular commit 2) regular commit 3) commit which adds 100mb of useless files + does ...
0
votes
2answers
301 views

Have .gitignore to NOT ignore an .htaccess file within top level directory

I am trying to ignore ALL files except the .htaccess file within the www directory. I have this: # Ignore everything in this directory * # Except this file !.gitignore !/www/.htaccess And I have ...
1
vote
1answer
234 views

Git mergetool meld on windows using putty

I have used meld to merge the conflicted files in git for a long time while running on Ubuntu. Now I need to merge files, but my environnement has changed. I now use a PC on Windows 7, and connects to ...
1
vote
3answers
200 views

File not shown in git diff after a git add. How do I know it will be committed?

I had an untracked file which was not appearing in a git diff and when I added it to the 'changes to be committed' area, it still doesn't show up in the git diff. I shows up with a 'git status -v' ...
1
vote
1answer
42 views

GIT: efficient way to prevent commiting non-functional changes?

I don't want any non-functional changes like spacing, new lines, tabs in my commits. I used to use SVN which had a UI showing 2 screens (old file on left, file I'm about to commit on right) that let ...
0
votes
1answer
63 views

TDD & Git commit comments [closed]

I'm using TDD in my project. I write a test, watch it fail, write code to make it green and commit with Git. I have read about commit first development, but I don't understand how to do it with this ...
0
votes
0answers
17 views

git pulling from one repo and updating several branch

I have to branches A and B. I want to add to B all the changes that were pulled from remote repo into A. What is the best way to do that ? Because I tried git cherry-pick #sha_pull_into_A, where ...
0
votes
1answer
25 views

Drop updates of a file in git

I have made some updates in one file, but I do not need those updates any more before I stage and commit, how could I drop the updates in this file and get the version before updates?
-3
votes
2answers
55 views

How to commit and create a branch?

Currently I am working on the master branch and I have some changes hopefully to commit to a new branch which does not exist. Is there any simple way to do this? BR, Ruochen
1
vote
2answers
46 views

Git(hub) remove older commits

i made some trash commits that i dont want to have anymore Let's say i made some minor changes and commited after each change. But i only want to push from last my last commit on to github. Here's ...
0
votes
0answers
105 views

Push to bitbucket repo without creating a merge commit

On bitbucket I have ProjectA. I have a fork of ProjectA that i'll refer to as forkProjectA When on my local machine I have 2 remotes origin #forkProjectA upstream #ProjectA Then pretend I do ...
0
votes
1answer
15 views

Git 'blob' versus 'commit' problems.

I have a project in which I want to embed a python module. I git cloned the python module and rearranged it in my python structure. Now when I try to add the python module in my git repository it is ...
1
vote
2answers
487 views

How to copy a commit from one branch to another in git without any merging?

I have 2 branches a master and an experimental. A shown: master-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-Y \ -x-x-x-x My experimental is quite outdated and i ...
3
votes
3answers
2k views

Use git stash save or git commit for local changes?

I changed some files in my repo, but don't want them to be pushed public or create any temporary branch to store them. I just want to save these changes in somewhere. So which command is better: git ...
1
vote
2answers
203 views

List commits between 2 commit hashes in git

I know there has been very similar questions here, but they didn't solve my problem. Perhaps there's something I'm not understanding well. This is a portion of the commit history of fitnesse ...
1
vote
1answer
514 views

git move file and directory into a sub-directory along with commit history

How can I move a directory and files to a sub-directory along with commit history? For example: Source directory structure: [project]/x/[files & sub-dirs] Target directory structure: ...

15 30 50 per page