Should git delete a file on master when one deletes it on a branch?
I am trying to delete some files in a branch, but I don't want those files deleted from master or from other branches. However, when I delete a file on branchA, the same files are deleted on branchB and master.
This is not what I am expecting. I am expecting to still have the files on master and branchB.
So my questions are
a) Is this the expected behavior? b) If not, what is going wrong? c) Is something is going wrong, how do I fix it?
I have a Git repository with 'master' branch. Some time ago (few months), we stopped using master, and created a new branch that all work is being done on. I am now setting up source indexing with git
$ git branch -a * SocialAct master remotes/origin/HEAD -> origin/master remotes/origin/SocialAct remotes/origin/social I want to delete the remote branch remotes/origin/social, and applied follo
I merge branch A with branch B, and delete branch A. When I tried the same thing in remote repo: delete branch A, I got an error like this: fajar@FAJAR-PC /e/project minggu ini/ProjectTesis (master) $
Suppose i have Branch A and then i have master branch. Now i am confused is these two same git checkout master git merge Branch A git push origin master git checkout Branch A git merge master git pus
I create a git repository via git init. I do git branch. Problem: I was expecting to see one branch listed, the Master branch. But nothing is listed. Why?
An intern has created a branch from our master branch and has named it Master! Now when I want to merge my code into the real master and do a git pull, I get an error like this: error: Ref refs/remote
I can't delete the branch in my remote server. First I tried this one git push origin --delete devTime but it gives me an error like this: fatal: 'origin' does not appear to be a git repository fat
In Master Git there is Core-src.A and Feature1-src.B. Then a new Branch is created and in that branch Core-src folder is deleted and also a new file is created Feature1-src.New. . Now when we merge th
I have a git repo with public master and develop branches. I committed to master when I should have committed to develop. I understand that I can move the commits from master to develop with the follo
Possible Duplicate: How to merge a branch into another with override option in git I have some folders on a branch, I want them to just override the same folders on master. I dont want to go through
I recently delete all file from current branch, with rm --cached command without delete .git folder. Then staged just one file in current branch. But when I try to push that file to remote repository,
Git checkout/pull doesn’t remove directories? I'm kind of new to git and slowly learning various parts of it. So forinstance I have a branch Master with FolderA I have later from Master created a b
I've been making some vast changes on the master branch of my Git repository. I'm pretty new to Git and so I'm wondering: How can I move my current master branch to a new branch and recreate my master
git push origin master Total 0 (delta 0), reused 0 (delta 0) error: unable to resolve reference refs/heads/master: Permission denied remote: error: failed to lock refs/heads/master To git@remote-repo
We have branches origin and develop. The initial state of master was tagged at tag_ABC. We have few changes made to the develop branch and pushed to origin. Then we have accidentally merged develop in
I have bit of a difficulty in deleting a local ref branch(refs/notes/origin/commits). I was able to delete the branch(refs/notes/origin/commits) in the remote repository using the command git push ori
Just when I thought I'd got the hang of the git checkout -b newbranch - commit/commit/commit - git checkout master - git merge newbranch - git rebase -i master - git push workflow in git, something bl
~/repo/samples>git rm subviews.js rm 'samples/subviews.js' Deletion of directory 'samples' failed. Should I try again? (y/n) n Why does it try to delete directory when I clearly told that I want t
When you run git branch -r why the blazes does it list origin/HEAD? For example, there's a remote repo on GitHub, say, with two branches: master and awesome-feature. If I do git clone to grab it and t
I'd like to copy a file from one git branch to another but save it as a different filename. I know I can do this to copy it over with the same name. Is there a way to rename during the checkout? git c
I am trying to pull from a repository in Github. But I don't want to clone the master branch. I want to clone some other branch. When I try git clone <url>, I get the files from master branch. W
When working with many projects and branches at the same time, I occasionally do stupid mistake like pulling into the wrong branch. For example being on branch master I did git pull origin dangerous_c
Recently I've got strange problems with Git auto-merge. I (and one of my colleague) make commits on topic branch but when I try to merge it with our master Git fails to auto-merge almost all files tha
How do I rename a branch 'a' to 'master' and rename 'master' to 'b' in gerrit? I have recently switched to gerrit from a shared git repository.
Most git repositories have a master branch, but there's really nothing special about this name. You can delete the master branch, rename another branch to master, skip having the master branch altoget
I host on BitBucket when i clone repository or use git pull origin mater and git pull origin my branch it does pull second time, but when i list branches (git branch -v) i only see master doing git st
I want to delete a branch both locally and on my remote project fork on GitHub. Successfully Deleted Local Branch $ git branch -D bugfix Deleted branch bugfix (was 2a14ef7). Attempts to Delete Remote
Some contributors in our project likes to work on master directly and still forget to git pull --rebase. Is there a way to refuse on the server side commit with commit like Merge branch 'master' of .
I followed this post on how to create and checkout a branch using git svn so that the branch was actually created on the svn repos. This worked great. When I was done with my branch, I did a checkout
Given a git repo with two branches master and feature. When rebasing the feature branch on top of master using rebase master lets say that file a.txt contains a conflict that needs to be resolved befo
I'm new to git. I thought the idea behind using feature branches was that all changes would not show up in the master branch. I just created a feature branch called 'line_items', though the changes on
I have a problem with git-gui and git-bash in Windows. Clone existing repository in git-gui Branch->Checkout->Tracking Branch in git-gui Go to my repo in git-bash git branch in git-bash shows
I am using git for my project and trying to follow best practice: I work on topic branch When ready, I merge the topic branch into my dev branch using git merge --squash. This keeps my dev branch cle
Git diff seems to return different changes when comparing: git diff origin/master ... origin/branch git diff origin/master...origin/branch What's the difference between the two? For those that can't
I created a branch 'users' in which I did a load of changes including one .less file. I had a less compiler open which automatically compiles on save. When I changed to the master branch the .less fil
Is it possible to set branch permissions using git bash? I would like to have much more strict permissions on the master branch, so that some people can use the development branch and commit to it and
Can I have two different files in two branches with Git ? I mean branch master have a file named foo and branch new-master a file named bar.
When I git pull from a branch that is not master, I get following response. You asked me to pull without telling me which branch you want to merge with, and 'branch.not_master.merge' in your configur
Basic question but this happens to me all the time: Make changes in a working-branch Switch to master git merge working-branch git push cap deploy(to staging) make a new cup of tea then I come
I'm working on a branch (my-branch) that I created from master. $ git checkout -b my-branch I edited some files, and then checked them into the new branch: $ git commit -a -m 'Add new feature' Then
I would like to know if there is any command available to get the SHA id of a particular file on a given specific git branch on the GIT remote server? Thanks, Srinivas
If I merge a git feature branch back onto master, is it best to then delete the branch? Let's say 6 months later, I want to resurrect that deleted branch (assume a freshly cloned repo). Is there a way
I'm trying to rebase and squash all my commits from current branch to master. Here is what I'm trying to do: git checkout -b new-feauture make a couple of commits, after it I was trying: git rebase -
I pulled a remote branch. I made some changes. I want to push my local changes back to my remote branch (not master) Here's the commands I used to pull git remote add my-desktop ssh://mydomiain.com/us
I'm using git svn and I have two local branches: master and feature. My feature is done and now I want it to be part of the master branch. I think I'm supposed to do this: git checkout feature git re
I am on master. When I do git status I am told $ git status # On branch master # Your branch is ahead of 'origin/master' by 13 commits. # (use git push to publish your local commits) # nothing to co
I have two branches(Master and Dev). I did some things on the Dev branch, and attempted to merge them with the master branch. git commit -am Dev changes git push git checkout master git merge Dev
I have a fork of someone else's repo like and have committed a number of changes to my master branch like so, and pushed to my fork: [upstream/master] --- C1 --- C2[origin/master] I then decided that
Something wrong going on with one of the files in my local git repository. When I'm trying to change the branch it says me that: Unlink of file 'templates/media/container.html' failed. Should I try ag
I would like to merge from FeatureBranch to master, without doing ,,checkout master'' first. I've tried (being in FeatureBranch) git push . master but I got (to a degree of surprise) : Everything up-