while git remotes (that includes github) do know that they are being force-pushed to, I don't believe github makes that information available on your repo's web page, and no git remote transfers that information to local git clones

snowkidind: well git says you do have local changes. Why don't you do a "git difftool" to see what new things you added compared to the commit you have checked out. From the looks of it you might have checked out a different commit as a detached head or copy/pasted code into your repo from a different commit

Topic for #git is now Welcome to #git, the place for git help and a fresh start on a new branch | Public logs at http://jk.gs/glog | First visit? Read: http://jk.gs/git | Current stable version: 2.11.0 | Getting "cannot send to channel"? /msg gitinfo .voice | This channel may contain users known to the state of California to cause cancer.

hello. I have been working on branch on two different computers. I accidentally make a force push to remote from comupter where working branch was behind. Is it possible to get prevoius remote state before I make a force push? Currently I don't have an access to other computer?

If you had a project, and you were responsible for a sub-module all by yourself, would you still follow feature branches, pushing each all the time, or would you just maintain a development branch with release tags?

(rearranging the history of multiple branches is going to be a PITA to setup without graphical tooling anyway, IMO, so it doesn't matter what langauge git accepts - I'll write the tooling to spit it out)

chele: rebase doesn't like doing anything when you have any uncommitted changes. you can use --autostash to make rebase stash your changes and automatically restore them if the rebase completes successfully.

the reason is that the way merge works, it's easy for it to know exactly which files will need to be updated, so it can distinguish situations in which your unstaged changes touch one of the files updated by the merge from situations in which they touch only unrelated files

rebase, on the other hand, works by resetting your head to a new upstream (up to that point a similar check would be straightforward, but resetting without throwing away unstaged changes actually isn't that easy, so that's another complication), and then look through all the commits that are going to be re-applied, before even doing anything, just to know which files will be affected

Hi, I'm not able to normally update .gitignore I have webroot dir and bare repo dir. I'm changing .gitignore adding /files/* into it to ignore all the files on this folder. Then I'm doing git rm -r --cached . and git add . and git commit and git push --all to bare repo.

kyellow: hi! I'd like to automatically welcome you to #git, a place full of helpful gits. Got a question? Just ask it — chances are someone will answer fairly soon. The topic has links with more information about git and this channel. NB. it can't hurt to do a backup (type !backup for help) before trying things out, especially if they involve dangerous keywords such as --hard, clean, --force/-f, rm and so on.

marchelly: hard to say – if you did run the commands you said you did it should have worked I think. do you still have your terminal backlog so you can confirm? reset back to the previous commit and re-do the procedure, then run "git status" before committing to make sure

tobiasvl, yes, I as developer do not have access to that repo and that files, but I do need. So as git administrator (let's give such a role :) ) I should update my git post-receive hook and add some lines there. For example go to that 800G repo, pull, add all (as per new gitignore it's html files) and commit? is this good way?

marchelly: Git is not a deployment tool, but you can build one around it (in simple environments) or use it as an object store(for complex ones). Here are some options/ideas to get you started: http://gitolite.com/deploy.html

I guess you _could_ have a post-receive hook that goes to the other repo and does "git fetch; git reset --hard origin/master" and then adds the html files, if it never gets any local changes you care about

ankit01ojha: hi! I'd like to automatically welcome you to #git, a place full of helpful gits. Got a question? Just ask it — chances are someone will answer fairly soon. The topic has links with more information about git and this channel. NB. it can't hurt to do a backup (type !backup for help) before trying things out, especially if they involve dangerous keywords such as --hard, clean, --force/-f, rm and so on.

I am having a problem the problem is like this - I deleted my old local repo and I have pushed some code from it on github which has made a pull request page , now I cloned a new one and but I want to push my code to the previous pull request page.

Hey guys, i'm trying to checkout a specific folder from a remote branch and merge it into another, according to an article i read, i can use "git checkout <branch> -- <path to file or directory>", which i've attempted, and git tells me "fatal: cannot update paths and switch to origin/<remote branch> at the same time" and "Did you intent to checkout '<path to folder>' which cannot be resolved as commit?"

osse: i endup in a lot of conflicts. and resolved all of them by using git checkout --ours ... and continue rebase. most of the time i needed to do git rebase --skip, because there was nothing to apply. is that the right approach if i want to keep the code from my branch?

Are there any things which commit objects will always reference? I already read through the internal workings of a Git repo on git-scm.com and now I'm pondering if I could use a server side hook to achieve what I want. (following)

Basically I'd like to use that file to build the revision number into the project, so that when you run the software, you can refer to that revision - and that people without access to the repo can still have a grasp of deltas of separate builds.

We have some ... "specific" requirements when it comes to documenting stuff, though, so if we use this to refer to versions, it makes some bureaucracy stuff much simpler for us, if we have a simple source for the number and can lateron still point to that.

With the counter we can relatively simply point at the documented process that external builds can only come from this or a higher level branch, and point at the history that each commit has its own, unique, always increasing number.

hi! is there a way to squash fixup commits while keeping the merge structure? I use the --no-ff when merging so every feature is in a branch starting from and merged to master. The original commits are in those feature branches.

does anyone know how to get a more detailed breakdown of what is taking up space in a git repo? specifically when it comes to commit history? My repo is 8.3GB but when I pull it is only 4.7 GB. So I would like to figure out what I can do to reduce the size of it some

sorry for coming here with help requests.. I keep getting my git repo in the state that pushing to the remote complains with "no changes made". It's the second time in two days, and i don't know a) why and b) how to get it unstuck

Is there a webserver that can look at git branches individually? like something I can run locally when I do a branch and want to have someone test that branch in my (using php on this for now) malgorath-101 branch. Now if I don't change branches Apache runs it fine, but if I need to work on another branch while waiting on testing for 101 I can't just work on another branch without it switching in apache to the new branch

jast, here is the scenario: I have a development web server that I work on. I have multiple projects under a localdomain (10.0.2.150/projecst/*) now if I am working on project for person 1 it might be pathed 10.0.2.150/projects/person-1/

Woah, slow down for a bit. Are you sure that you need to jump through that particular hoop to achieve your goal? We suspect you don't, so why don't you back up a bit and tell us about the overall objective...

BlessJah: at least for me, the use case is "not have to care, at all, whether I'm working on my laptop or sshed into my server when I'm working on stuff in ~/devel, while at the same time being able to use the laptop without network connectivity"

hey guys, i have github desktop on a mac and i have a forked repo and i made a branch there and did some changes and loaded the foreign changes that happened in the original repo and now when i want to sync my own fork i get "Authentication Failed: You may not have permission to access elixir-school. Check Preferences to make sure you’re still logged in."

I mean, all of this can be worked around (use temporary branches instead of stashes, commit untracked files to one of these branches before syncing, copy .git/config and .git/hooks into the worktree and do the same there, reverse this procedure when receiving a sync), but at some point you have to ask "wouldn't it be easier to just use a networked filesystem or something"

... of course this may be quite complicated in reality. One may have to normalize the config files in some way before syncing them, for example, and perhaps also remove "local" parts that are specific to a single machine.

elsevero: also note that the old commits will still be around, just that now your branches and tags will be pointing at new ones. The old commits will still be in the repo but will be cleaned up eventually. Also everybody who has cloned the repo will need to pull down the changes and git will whine because history has changed