Fork me on GitHub
#off-topic
<
2019-08-07
>
Ahmed Hassan06:08:50

How can we move files from untracked to unstaged in magit?

Ahmed Hassan06:08:33

s move files from untracked to staged.

dpsutton06:08:23

I don't believe git has a notion of that. If a file is untracked what would it mean to have it unstaged?

👍 4
Ahmed Hassan06:08:53

Right. I am using magit. Basically I want to move files to another branch. but branch is not changing because files are not commited.

dpsutton06:08:13

but branch changing is permitted with untracked files

dpsutton06:08:17

so change away

theeternalpulse06:08:20

@ahmed1hsn you probably want to try stashing

theeternalpulse06:08:29

stage your untracked changes and then stash, switch to another branch, then apply/pop stash

👍 4
dpsutton06:08:34

i don't believe you can stash untracked files

dpsutton06:08:41

ah good point

theeternalpulse06:08:44

stage them first

Ahmed Hassan06:08:50

@theeternalpulse untracked files are not being stashed

dominicm07:08:41

Try the -u flag

theeternalpulse06:08:20

at the end of the day, if you can guarantee you added unique files that aren't on any other branch, you can switch

dpsutton06:08:23

have you hit $? there may be more going on than you think

Ahmed Hassan06:08:30

right staged ones are stashed.

dpsutton06:08:31

should bring up the logs

theeternalpulse06:08:41

I generally stash/apply since if I make a mistake and delete I still have them

theeternalpulse06:08:08

or I do snapshots to just have some code lying around jic

Ahmed Hassan06:08:42

How snapshots differ from stashing?

theeternalpulse06:08:56

snapshot creates a stash without checking out HEAD

theeternalpulse06:08:13

so it just takes a picture of your working directory

theeternalpulse06:08:18

and puts it in the stash area

dpsutton06:08:58

oh very cool. I didn't know that.

theeternalpulse06:08:33

yeah, It's really a piece of mind feature, ideally I'd just be committing/pushing routinely

theeternalpulse06:08:39

I just looked this up too @ahmed1hsn

z w     (magit-stash-worktree)
Create a stash of unstaged changes in the working tree. Untracked files are included according to infix arguments. One prefix argument is equivalent to --include-untracked while two prefix arguments are equivalent to --all.

Ahmed Hassan06:08:56

what do without checking out HEAD mean?

theeternalpulse06:08:13

basically without wiping out your work-tree changes

theeternalpulse06:08:27

so snapshot does a stash, but doesn't get rid of the files

schmee22:08:36

any tips on how to setup a personal blog with a minimal amount of effort?

sogaiu22:08:56

gists on github?

schmee22:08:03

that’s a little too minimal 😛 I’m looking for a simple static template, with just a list of posts and a nice layout for each post

seancorfield22:08:14

I use Octopress and GitHub pages for http://corfield.org (and some other sites).

👍 4
schmee23:08:22

this Hugo theme look promising, I’ll give it a shot tomorrow: https://github.com/nodejh/hugo-theme-cactus-plus, thanks @deleted-user!

lilactown23:08:27

Hugo is OK to use, as long as you find a nice theme. I struggled to find a theme that worked just the way I wanted it to, though, and the theme tutorials seemed to lack a lot of details