These are chat archives for codebar/tutorials

23rd
Jul 2015
Denise Yu
@deniseyu
Jul 23 2015 10:29
does anyone have experience migrating image assets from a heroku platform service (in this case, Cloudinary) over to AWS?
Baris Balic
@barisbalic
Jul 23 2015 10:53
@deniseyu I'm not aware of any migration tools, I believe it's a case of DIY
Denise Yu
@deniseyu
Jul 23 2015 10:56
@barisbalic i had suspected as much... :-/ Cloudinary wants us to pay $50 a month for optimized image hosting, but last night a few coaches suggested just getting an AWS bucket would be much cheaper. if anyone has some time to help out w this, please let me know. i've not had to do this before and don't want to accidentally delete all of our assets lol
Baris Balic
@barisbalic
Jul 23 2015 11:02
You can have both in place, and not delete cloudinary resources until you're happy/sure it's all in place
Carolina Sawney
@assembly21
Jul 23 2015 11:49

Hi: I'd like to know how to create a .gitignore file from the command line to exclude .idea related files. I don't know what do I need to exclude.
Or if this is just a txt.file.

I have this:

'code'
Carolinas-MBP:first_git_project carolina$ git add .
Carolinas-MBP:first_git_project carolina$ git commit -m "Initial commit"
[master (root-commit) 19c3842] Initial commit
9 files changed, 394 insertions(+)
create mode 100644 .idea/.name
create mode 100644 .idea/compiler.xml
create mode 100644 .idea/copyright/profiles_settings.xml
create mode 100644 .idea/first_git_project.iml
create mode 100644 .idea/misc.xml
create mode 100644 .idea/modules.xml
create mode 100644 .idea/vcs.xml
create mode 100644 .idea/workspace.xml
create mode 100644 first_file.html
Carolinas-MBP:first_git_project carolina$ .idea/
-bash: .idea/: is a directory
Carolinas-MBP:first_git_project carolina$
'code'

I know that inside the .gitignore file I can add this:

.idea/workspace.xml
.idea/modules.xml

Thanks!

Denise Yu
@deniseyu
Jul 23 2015 11:55
in .gitignore in the root of the project directory (create one if you haven't yet), just put .idea/in it
Carolina Sawney
@assembly21
Jul 23 2015 11:56
but idea has .idea/first_git_project.html that's the one I'm tracking...and how to I create the file, what kind of file is it. What should I write on the command line I mean.
Denise Yu
@deniseyu
Jul 23 2015 11:57
then exclude by extension, like .idea/*.xml, etc
Baris Balic
@barisbalic
Jul 23 2015 12:09
@assembly21 @deniseyu from the command line you can use echo in conjunction with >> to append to a file
@assembly21 @deniseyu for example echo .idea >> .gitignore will add ".idea" to the ignore
If you use special characters you may need to put " around the string
echo ".idea" >> .gitignore
Carolina Sawney
@assembly21
Jul 23 2015 12:17
that's the line of magic I needed, cheers.
Baris Balic
@barisbalic
Jul 23 2015 12:24
@assembly21 no problem!
@assembly21 be cautious of dropping > because that will overwrite the file rather than append to it
Carolina Sawney
@assembly21
Jul 23 2015 13:37

Shall I ignore the .gitignore "untracked files" and the "changes not staged for commit"? Here's the console.

"code"
Carolinas-MBP:first_git_project carolina$ git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)

modified:   .idea/misc.xml
modified:   .idea/workspace.xml

Untracked files:
(use "git add <file>..." to include in what will be committed)

.gitignore

no changes added to commit (use "git add" and/or "git commit -a")
Carolinas-MBP:first_git_project carolina$

"code"

Thanks.

Baris Balic
@barisbalic
Jul 23 2015 13:38
Sorry I cannot understand what that means
You wanted to ignore idea?
you would need .idea/ in your .gitignore
Carolina Sawney
@assembly21
Jul 23 2015 13:39

yes, but now if I do git status I get changes not staged for commit and lists the .idea files that I modified. And also says that I have an untracked file, .gitingore.
In the .gitingore I have all this:

.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/first_git_project.iml
.idea/misc.xml
.idea/modules.xml
.idea/vcs.xml
.idea/workspace.xml

Baris Balic
@barisbalic
Jul 23 2015 13:43
Okay, so the problem is that these files had already been added to git
You need to tell git to forget about them, and then they won't creep up like this
You will also need to add the .gitignore, that cheeky beggar lives in git alongside your project
Carolina Sawney
@assembly21
Jul 23 2015 13:44
Shall I start again?
Baris Balic
@barisbalic
Jul 23 2015 13:45
Have you pushed this code to github yet?
Or is it all just local?
Carolina Sawney
@assembly21
Jul 23 2015 13:45
local
Baris Balic
@barisbalic
Jul 23 2015 13:46
Okay TBH it's a bit hairy if you are unfamiliar with git, you would need to rebase, remove the files from the index and amend the commit.
It would probably be quicker to destroy the .git/ folder in the project, do a git init and just re-add the files you do care about
Carolina Sawney
@assembly21
Jul 23 2015 13:47
ok
Baris Balic
@barisbalic
Jul 23 2015 13:47
git init will make it a repo, but it wont add the remote, so if you have it on github you will need to add the remote again
but that's quite easy, it's just git remote add origin git@github.com:YOURUSERNAME/YOURREPONAME
If any of this is confusing please tell me and we can jump to DM and go step by step
Carolina Sawney
@assembly21
Jul 23 2015 13:54
I think I can do it, cheers. I'll learn remotes tomorrow.
Baris Balic
@barisbalic
Jul 23 2015 14:05
No problem @assembly21 feel free to DM me if I dont reply, I don't pay as much attention to gitter as I used to
Carolina Sawney
@assembly21
Jul 23 2015 14:06
DM?
Baris Balic
@barisbalic
Jul 23 2015 14:10
Direct Message
Should result in an alert on my phone
Carolina Sawney
@assembly21
Jul 23 2015 14:11
ja! ok.