Other consequences of `git push --force`?
Questions and answers about forcing a
git push aren't hard to find (here are two). The standard answer goes something like this:
If you have to force a
git push, technically you can with the
--force option, but procedurally you shouldn't because someone may have already pulled and somewhere a kitten will die.
I see this as generally sage advice - the safer route is to just commit again, fixing whatever you broke. But let's say for example I know (magically) that no one has pulled the commit(s) yet. Or better still, that this is a private repo and so there's no danger of breaking anyone else's clone in the first place.
Are there any other [negative] consequences of
--forceing a push, specifically technical consequences? Maybe it causes some extra garbage in the remote, or it breaks version 1.2.3 of X Corps' analysis tool, or it makes rebasing more confusing later on, etc.. Anything?
EDIT 1: I have my own anecdotal evidence suggesting that
--forceing a push on a private repo doesn't seem to cause any problems. I'm not interested in perception, though; I'm looking for references and/or proof of such.
If I have many unpushed commits spread among many branches in my local repo, what happens if I type git push? Will all of those commits be pushed or only those which belong to the current branch?
I changed code in submodule and want to share with other team members. (Wow git submodule is hard) > cd to submodule > git add/commit > git push prompts me Username: and Password: > Userna
it seems like there is no proper documentation regarding git notes. I have added some notes to one of the commit using git notes add command. but when i push the commit, and later do a separate clone,
I can not understand, why 'fatal' is here? And really all commits are pushed. oleg@shoom-gnome:(master)~/workspace/S4$ git push Counting objects: 5, done. Compressing objects: 100% (3/3), done. Writin
How do I push code I have using git without it complaining to me about conflicts or anything. I want it to ignore conflicts and simply replace what is on our git server with the code I am pushing. How
I am having an odd problem with a repo. When I try to push my latest commit I can't, even though I am pretty sure that I have the latest commits and I am the only one who has been editing the repo in
I'm using a VM based on Ubuntu 12.04 (ruby 1.9.2p290 and rails 3.1.0) and my app work perfectly on local. I'm using git and when I try to git push heroku master it doesn't work: git push heroku master
i'm trying to push local changes: git push all all means repo on github and remote server - in my .git/config: [remote all] url = email@example.com:...myrepo.git url = ssh://usrname@servername/myrep
Attempting to push my development branch to my github repo. git push origin develop -v The connection hangs and hangs and hangs and hangs and never times out. I never receive error messages nor writ
In a Git tutorial I'm going through, git commit is used to store the changes you've made. What is git push used for then?
How can I add files starting with dot (hidden files) in git repo? Git seems to always ignore those. When I type git add ., dotfiles in GIT_DIR are added, but not from subdirectories. On the other ha
I think I now tried about everything that is to be found on the web around git push from within a TeamCity build I tried this: TeamCity: On successful build push to Git Repo and this: http://devnet
I got this error and now I'm scared. $ git pull Already up-to-date. $ git push To firstname.lastname@example.org:Unroll-Me/unrollme_thumbnail_generator.git ! [rejected] master -> master (non-fast-forward)
I'm currently in the process of migrating my team from SVN to GIT. Rather than clone the whole entire subversion repo, I opted for... git svn clone http://foo.com/svn/branches/dev --no-minimize-url --
I would like to know if there is an easy way to push a GIT repository into production (on a FTP server) ? Thanks
I followed the first steps after creating a repository in github, but when I got to the line: git push -u origin master it fails with this error: user$ git push -u origin master error: The requested U
Is there a way with git to ignore local changes to a file but continue tracking it into the remote repo ? I wan't to fetch but not push a file. In my case, I want the .project eclipse file to be commi
I am totally new to programming and I'm using GIT first time. I am trying to build Ruby web app and I had problems to git push and somebody told me to use git push -f. But now I read that it was proba
I would like to run a unit-tests before every git push and if tests fails, cancel the push, but I can't even find pre-push hook, there is pre-commit and pre-rebase only.
I would like to run a compression script before git push such that anytime a user tries to push changes to a remote repository, it checks for uncommitted changes in the compressible assets, aborts git
Say my co-hacker and I find ourselves on a desert island. Normally we push and pull to github to sync with each other. How would you recommend we do so when we have no connection to the outside world?
I'm behind a proxy, and I'm quite new to git and I'm on Windows XP. I've been able to make a git push origin master work from msysgit but can't make it work in Cygwin with Cygwin's git. I configured g
I've looked at the githooks manpage but unless I'm missing something I don't see an option for local, post-push git hooks. I'd like to have one that updates the api docs on my web server (for which I
I have this problem when i try to push in git: error: insufficient permission for adding an object to repository database ./objects fatal: failed to write object error: unpack failed: unpack-objects a
I looking for the command which not available in git version 1.7.4 but I am not be able to upgrade the git client. So, are there any command which equivalent to git push --prune
I am trying to add a second local repo on my local machine. So I created a directory, made a git init there and then I ran : git remote add new_repo /path/.git Then from my local repo, I ran git push
error: failed to push some refs to 'email@example.com:apal.git' To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes (e.g. 'git pull') before pushing a
I am working on a project with multiple developers on different branches, which exists on let's say: ...github.com/owner/project. There is the usual master, me, and several other branches. I w
Has anyone seen this error before while doing a git push? Any tips to debug or overcome the error? mkdir opensource && cd opensource git clone git://git.qinc.com/platform/vendor/q-opensource/w
Possible Duplicate: git push error '[remote rejected] master -> master (branch is currently checked out)' Im trying to push my repository to the origin, but I get this error when i run git pus
I git push my work to a remote GIT repository. Every push will prompt me to input username and password. I would like to avoid it for every push, but how to configure to avoid it?
I am following the ruby.railstutorial. I run the command git push heroku master and it spits out this error. Permission denied (publickey). fatal: Could not read from remote repository. Please make
I have branch named X which I want to push to a remote master branch. But when I execute: git fetch remote_name git checkout -B branchX remote_name/master ... Add a commit ... git push remote_name mas
I usually run: git push git tag v4.7 git push --tags Both the first and third operations connect to the server, which wastes time. I want to make it faster by pushing only once. What command(s) would
When I push to heroku, it tells me that it fails to install gems with bundler and then it fails: Git error: command `git fetch --force --quiet --tags 'firstname.lastname@example.org:holgersindbaek/streama.git' refs/
I've run into a problem with my origin/branch being out of sync with my local branch, see below When I try to PUSH from my local staging branch to the origin/staging branch I get the rejected - no
Problem: Need to push the changes from local git branch to a different remote git repository branch and this changes pushed to the branch will be compared with the master existing in the remote URL an
I setup a ssh key for github account, so I don't have to enter the password every time, it works fine. Here is the script I use: #!/bin/bash git push origin master But when I use cron to run it, it w
When using the Amazon Web Services (AWS) Elastic Beanstalk command line interface, what is the difference between eb push and git aws.push
Git has --force flag in a lot of operations but when I use them I feel a bit strange. Like ignoring warning messages in my code. For example I just wanted to unstage a file and did this: git rm --cach
When I try to push new file into Git repository, it doesn't finish, on screen is my workflow: I tried: TortoiseGit 126.96.36.199 (git version 1.8.0.msysgit.0 (C:\Program Files\Git\bin)) Eclipse EGit 2.1.0
Is there a difference? And if so what is the difference between git reset --hard HEAD and git clean --force -d?
I have a git repository that contains other git repositories. Are there commands that recursively push and/or pull for not only the meta-repository but the sub-repositories?
I'm trying the following sequence of standard commands: git clone https://code.google.com/p/steambmc/ cd steambmc [made changes] git commit -a [added commit message] git push I've set up my username/
Is it possible to change the ssh user temporarly for a git push remote master without messing up with .git/config or git remote, or using the whole remote url? [root@host gitrepo]# git push other
I have read the git man about push command, but I still don't understand the EXACT difference between current and upstream to be set in the push.default I want that our team will just do push, and onl
I know they exist in git reflog, but if I push a commit to a remote repository, amend, then git push --force (warning: pushing --force to remote repositories should usually be avoided), will the commi
One of my coworkers is having a problem pushing changes from git on his machine. If he logs into another machine, he can push just fine - but from his machine, when he tries to push he gets the follow
I tried to push changes in my local branch(local_dev) to a remote branch(develop), I used below command, but it gave me an unexpected message after executing the command. $ git push origin local_dev :
When I push changes to Git server, I want it push the whole repository to other machines. [My machine]---- push ---->[git server]---- push ---->[Machine A] +------- push ---->[Machine B] I