Quantcast
Channel: User David Neiss - Stack Overflow
Browsing latest articles
Browse All 42 View Live

Comment by David Neiss on Remove Historic Git Commit so It Does Not Appear in...

The reflogs also point to commits, so that might have prevented gc from cleaning it up as well.

View Article



Comment by David Neiss on A file is no longer in HEAD revision but can't...

As yet another approach, you could harness git bisect with the <cmd> option to find out where a file got added/removed/changed.

View Article

Comment by David Neiss on Git Commands at a Glance

Thanks. Probably best to post as a question, but stackoverflow.com/questions/2596805/… might be your answer, but haven't tried it and Im only using default OSX 2.7.4.

View Article

Comment by David Neiss on How to get timestamp-neutral git hash from a given...

I know im not supposed to do this, but +t @hobbs

View Article

Comment by David Neiss on If I tag HEAD on a branch and delete the branch,...

I second Oliver's comment. So deleting the branch wont delete the commits, so long as the commits are reachable (so the tags, and even transient things like reflogs will still point to the commits, so...

View Article


Comment by David Neiss on Why did Git create a merge commit with no file...

There is an addition benefit to rebasing over merging that often isn't mentioned, and that is that bisecting works out better. If you merge, then bisect will walk both merged branches, which is not...

View Article

Comment by David Neiss on Merging local-only branches with a remote branch

If S then is the "isolate this code in a third local-only branch" then its commits will get pushed along with br1 and br2, so although the ref name "shared" won't, the commits from M..S will.

View Article

Comment by David Neiss on Confusion about Array and Array

Ok, thanks Charles (and others). That clears it up. I can do the downcast of o1[] to an Int and then use its value and assign it back to o1[] to update it.

View Article


Comment by David Neiss on nil value handling in Swift

Read something like stackoverflow.com/questions/24003642/…

View Article


Comment by David Neiss on Trying to avoid finding nil unwrapping optional values

I'm not sure why this got down voted. Seems like its the correct solution. Operator ?? is the same as saying "numberTextField.text != nil ? numberTextField.text! : 0"

View Article

Comment by David Neiss on Working with datatypes in swift

Where is the question? If you are using Swift4, JSON parsing has been greatly simplified. For example, read benscheirman.com/2017/06/…

View Article

Comment by David Neiss on Swift upcasting with "as", whats going on?

Ok, thanks matt (and Ewan). Yes, that 3rd case (the array) is what was throwing me off, so thanks for the edit to clear that up.

View Article

Comment by David Neiss on What could slow down a iOS App over time besides...

Alternately, is there something else in the system that is sucking more CPU over time, thereby depriving your App of run time or contending for some shared resource? Per the other comments, you are...

View Article


Answer by David Neiss for Git - Undo all the changes changes

If you haven't made any commits, another option might be to just "git stash" your changes to save them away, just in case you want to get them back again later (git stash apply or pop).Read more at...

View Article

Answer by David Neiss for How to git pull rebase using GitPython library?

Have you tried g.pull("--rebase")

View Article


Answer by David Neiss for Can I change which branch a Git branch stems from?

Have you tried to rebase your item-0012 onto develop? From rebase docs: Here is how you would transplant a topic branch based on one branch to another, to pretend that you forked the topic branch from...

View Article

Answer by David Neiss for How do you know which branch that a newly created...

Git branch comes off your current branch (actually HEAD), by default.If you want to specify where it branches from, specify the startpointgit branch [--set-upstream | --track | --no-track] [-l] [-f]...

View Article


Answer by David Neiss for Why after cloning a single branch in git, does the...

If you wanted to restrict your clone to one branch:--[no-]single-branch Clone only the history leading to the tip of a single branch, either specified by the --branch option or the primary branch...

View Article

Answer by David Neiss for How to make the keep mine strategy with git?

If the file is saved in the repo and you have local changes and then you checkout another commit, it wont overwrite your local changes, so it should persist (provided you haven't specified -f to the...

View Article

Answer by David Neiss for Block access to old git repos after migration

Look at git server side hooks, https://git-scm.com/book/en/v2/Customizing-Git-Git-HooksFor an example, https://git-scm.com/book/en/v2/Customizing-Git-An-Example-Git-Enforced-PolicyTo totally block...

View Article

Answer by David Neiss for Get authors of git branch

git log --format='%aN'<branchname> | sort -uBy default, you didn't specify the branchname, so it defaulted to HEAD, which points to your current branch. Just specify your branch name in this...

View Article


Answer by David Neiss for Git: how to make a branch that collaborators can...

Well, its no more complicated than git checkout -b newBranchNameYou might do well to read through the first 2 or 3 chapters of the GitPro book, available for free on the web,...

View Article


Answer by David Neiss for Git workflow with large files

As I understand it, the last commit has a combination of changes plus one large file. If you revert that commit, that may make it look like the large file is gone, but its still present in the history....

View Article

Answer by David Neiss for How do I forcibly ovewrite a local repo with...

You can't have the remote do a merge for you. You need to do the the merge and then you push to it what you have and it just fast forwards up to your commit. So you need to arrange your commits to...

View Article

Answer by David Neiss for Move .git into a different directory than the...

git init:--separate-git-dir=<git dir> Instead of initializing the repository as a directory to either $GIT_DIR or ./.git/, create a text file there containing the path to the actual repository....

View Article


Answer by David Neiss for How can I detect if any change has been made to a...

You really just want to see if (after fetching) your remote tracking branch origin/branch is the same as your local tracking branch, so just check the SHA's of such (followed by a merge to catch you...

View Article

Answer by David Neiss for How to get the log of a single commit without the diff

Did you try:git log -n 1 --pretty=%B <treeish>

View Article

Answer by David Neiss for How do I extract the git commit ID used to make a...

It's metadata stored in the zip file. Have you tried unzip -Z latest.zipUnZip 5.52 of 28 February 2005, by Info-ZIP. Maintained by C. Spieler. Sendbug reports using...

View Article

Answer by David Neiss for Touch all files in a git repo so git thinks they...

If you were asked to "generate a report with all files" does that mean list all files in a commit? Cause that's easily done with something like a git ls-tree -R HEAD

View Article



Answer by David Neiss for gitignore include specific subfolder

Does this work for you:/venv/**!/venv/lib/python2.7/site-packages/nhlscrapi

View Article

Answer by David Neiss for Rewrite history to include a staged file

You could make the second commit and then try to do a git rebase -i HEAD~2 and swap the ordering of the two commits around in the editor that pops up.

View Article

Answer by David Neiss for How to make git checkout-index strip off prefix

May not be the best solution, but if you do a git checkout-index --temp <file> you can get just the file with a .merge_file_XXX name (capture the name from the output of the checkout-index) and...

View Article

Answer by David Neiss for Unable to delete unwanted commits made on github

After you force pushed to backup origin's master, it should have move your local remote tracking branch origin/master to your old HEAD~2 commit, after which you can just git rebase -i HEAD~3 and...

View Article


Answer by David Neiss for Change author of git commit that is already merged

Do what they said (git commit --amend --author="Author Name <email@address.com>") and push -f it before someone adds more stuff on top of this (or at least this seemed to work correctly for me on...

View Article

Confusion about Array and Array

Starting out with Swift3, and am confused by following:var o1:Array<Any> = [1,2,3]var o2:Array<Int> = [1,2,3]print(type(of:o2))print(type(of:o2[0]))o2[0] +=...

View Article

Answer by David Neiss for making changes to main class from subclass

Although SubVC is contained within mainVC, it doesn't have a reference to an instance of mainVC to access its properties and methods in mainVC, so you can't directly access them. But if you wanted to...

View Article


Swift upcasting with "as", whats going on?

protocol P1 { func doP1()}protocol P2 { func doP2()}class B {}class D : B, P1, P2 { func doP2() {} func doP1() {}}let s = D()print(type(of:(D() as P1)))print(type(of:(D() as B)))print(type(of:[D(),...

View Article


Answer by David Neiss for Get a cumulative git diffs for multiple...

I'm sure someone has a more clever approach, but you could try to squash all your chosen commits down into one and then do the diff on that one. You could do that by doing --cherry-pick with...

View Article

Answer by David Neiss for fatal: Could not open file .git/rebase-merge/done...

Before you try the following, make sure you stash or commit any uncommitted changes first, or you will lose them irrevocably.Then try to do a git rebase --abort.

View Article

Answer by David Neiss for Start and stop animation with CABasicAnimation iphone

Don't even deal with CoreAnimation. I think this can be do this with UIView animations, which are easier to program. Look at UIView documentation and try the block animations (assuming iOS 4.0. if not,...

View Article

Answer by David Neiss for Putting Git hooks into a repository

From TEMPLATE DIRECTORY, you could use one of these mechanisms to update the .git/hooks directory of each newly created Git repository:The template directory contains files and directories that will...

View Article


Answer by David Neiss for How can I view prior commits with git blame?

Building on Will Shepard's answer, his output will include duplicate lines for commits where there was no change, so you can filter those as as follows (using this answer)LINE=1 FILE=a; for commit in...

View Article
Browsing latest articles
Browse All 42 View Live


Latest Images