Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

repository - How can I undo my last git add/commit? -


i edited file , did:

git add file.py git commit -m 'fixed bug' 

i edited file , performed minor bug fix. don't want 2 commits, 1 after other, showing 'bug fix'. want 1 commit 'bug fixes'.

how can undo last add/commit , change first commit message?

i looking @ git reset, git revert, git undo commands don't want screw repo guess

edit: found out how it: http://www.gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html

if commited second change, reset first:

git reset head^ 

now head @ first commit, , content of local files unchanged.

git add <the file(s) second bug fix> git commit --amend -m'bug fixes' 

if tracked , changed file included second bug fix, can run instead, usual:

git commit -a --amend 

amending commit this:

  • adds changes in index previous commit (therefore need git add, or -a)
  • allows change commit message

be careful, though: if have distributed first commit, other people's repo strange. should not change commit else has fetched.


you use git merge --squash, feels more logical not easier. use merge branch containing 2 commits, unto previous commit.

squashing works git rebase well.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -