Git help
Forum rules
We don't support installations in VirtualBox, VMWare, qemu or others. We ignore posts about WINE, PlayOnLinux, Steam and Skype. We don't support btrfs, lvm, UEFI, side-by-side installations with GPT or dualboot with anything newer than Windows XP.
Google your problem first. Check the Wiki. Read the existing threads. It's okay to "hijack" an existing thread, yes! If your problem is not yet covered, open a new thread. To get the quickest possible help, mention the exact release codename in your post (uname -a is a good idea, too). Due to the lack of crystal balls, attach the output of lspci -nnk if you encounter hardware problems.
We don't support installations in VirtualBox, VMWare, qemu or others. We ignore posts about WINE, PlayOnLinux, Steam and Skype. We don't support btrfs, lvm, UEFI, side-by-side installations with GPT or dualboot with anything newer than Windows XP.
Google your problem first. Check the Wiki. Read the existing threads. It's okay to "hijack" an existing thread, yes! If your problem is not yet covered, open a new thread. To get the quickest possible help, mention the exact release codename in your post (uname -a is a good idea, too). Due to the lack of crystal balls, attach the output of lspci -nnk if you encounter hardware problems.
Git help
OK, I'm a complete git/Github noob. I've got this xcolor theme and scrot I wanna upload to our repo, but I have no idea what I'm doing, and all the tutorials I'm finding online are about working with my own repo, which I do know I'm not doing. I don't wanna start banging out commands and screwing something up. I didn't find anything in the wiki about contributing to the repo, but if I missed it, point me in the right direction, please.
I installed git, so I think I'm ready to do...something. Can somebody help a brother out?
And while I'm on the subject, I understand git is for code, but it seems that it should be something I could use for my stories and manuscripts, maybe using the same kind of version control that coders use. Am I on the right track there? Once I get the basics, could I use it as a central place to control which version of which draft I'm working on?
I installed git, so I think I'm ready to do...something. Can somebody help a brother out?
And while I'm on the subject, I understand git is for code, but it seems that it should be something I could use for my stories and manuscripts, maybe using the same kind of version control that coders use. Am I on the right track there? Once I get the basics, could I use it as a central place to control which version of which draft I'm working on?
Re: Git help
I'm at work now, but I'd be more than happy to put something together for you tonight.
Work hard; Complain less
Re: Git help
^ that would be way sweet. thanks a ton.
Re: Git help
Laundry: cool idea with the writing version control.
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: Git help
When I remastered "Author" (IIRC) I searched for some VIM plugins or methods that might help writers. Some resources, randomly:
https://www.gitbook.io/
http://wynnnetherland.com/journal/reed- ... or-writers
http://gabekoss.com/blog/2013/11/writing_with_vim/
http://www.drbunsen.org/writing-in-vim/
https://github.com/junegunn/goyo.vim
https://github.com/jamestomasino/vim-writingsyntax
http://matt.might.net/articles/shell-sc ... uplicates/
https://github.com/q335r49/microviche
http://haridas.in/vim-as-your-ide.html
Should give you some keywords for further research.
https://www.gitbook.io/
http://wynnnetherland.com/journal/reed- ... or-writers
http://gabekoss.com/blog/2013/11/writing_with_vim/
http://www.drbunsen.org/writing-in-vim/
https://github.com/junegunn/goyo.vim
https://github.com/jamestomasino/vim-writingsyntax
http://matt.might.net/articles/shell-sc ... uplicates/
https://github.com/q335r49/microviche
http://haridas.in/vim-as-your-ide.html
Should give you some keywords for further research.
..gnutella..
Re: Git help
^ Thanks for these links. I'll be surfing/reading intensely for quite a while.
Author is a nice spin. I just had trouble with the wm's, but I plan on giving it another go at some point.
Author is a nice spin. I just had trouble with the wm's, but I plan on giving it another go at some point.
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: Git help
Oh be patient, I am sure you get a personalized spin in a few days ;)
Just let me know what setup you prefer, plugins and stuff, and you can get a portable "Laundry" spin for a small USB stick
Just let me know what setup you prefer, plugins and stuff, and you can get a portable "Laundry" spin for a small USB stick
..gnutella..
Re: Git help
^ Funny you should say that (and thank you, by the way) because I've been trying to modify the Author setup for my own rig. I just don't have the time to do the modding I would like.
My needs are simple, so a 686-nonpae no-x (xorg and 64-bit for writing? why exactly?) spin of author, without emacs and worgrinder, would be just about perfect. Replace the vim suite (I don't Latex and I don't write screenplays) with the plugins from http://wynnnetherland.com/journal/reed- ... or-writers and that's handled. Git for version control of manuscript versions (once I learn how), add powerline for tmux and vim, and bang, all done. I don't even use fbterm anymore since without tinting, backgrounds on tty are just distracting. Colorscheme to suit my mood and I'm good.
If do my occasional printing on my wife's WInbox, and I won't even need cups/hplip, and thus no systemd for a while, either.
Oh, and I'd lose Wordgrinder, too. I love the idea, and I've been trying to dig it, but without printing and spellcheck, I need vim around to write with anyway.
My needs are simple, so a 686-nonpae no-x (xorg and 64-bit for writing? why exactly?) spin of author, without emacs and worgrinder, would be just about perfect. Replace the vim suite (I don't Latex and I don't write screenplays) with the plugins from http://wynnnetherland.com/journal/reed- ... or-writers and that's handled. Git for version control of manuscript versions (once I learn how), add powerline for tmux and vim, and bang, all done. I don't even use fbterm anymore since without tinting, backgrounds on tty are just distracting. Colorscheme to suit my mood and I'm good.
If do my occasional printing on my wife's WInbox, and I won't even need cups/hplip, and thus no systemd for a while, either.
Oh, and I'd lose Wordgrinder, too. I love the idea, and I've been trying to dig it, but without printing and spellcheck, I need vim around to write with anyway.
Re: Git help
disclaimer, I'm sure Joe would have a more proper tutorial for this.
Generally speaking ... we're looking at two separate things here, using git locally and with a service such as GitHub or Bitbucket.
Using locally:
initialize the directory, add the items, commit
First things first, create you ssh key
Copy the public key and use that for your key in GitHub/Bitbucket
Connecting with a remote server. Pretty much the same as above, of course we need to specify our remote location
When we push origin master, we push up to our remote GitHub account.
When you are happy with you current state, you can create a branch, and work off the branch.
Move to the new branch
Create and move to all in one
Now you can do all your work on the branch, when you're happy, commit and merge it with master
You can either keep the branch or delete
For cloning a repo
To help keep my clones organized I create a git directory
Other cool stuff
More disclaimer, please don't by shy about questions. Again, I am not a pro at this, its mainly from what I've picked up from personal use. There is obviously so much more that can be done, and possibly better ways to do stuff. For my configs and such I generally don't branch, but when I was coding, I would definitely branch.
Hopefully I didn't leave anything important out.
Edit: IIRC when you add a remote origin,if its added as https, not ssh. You can change that with set-url
Generally speaking ... we're looking at two separate things here, using git locally and with a service such as GitHub or Bitbucket.
Using locally:
Code: Select all
sudo apt-get install git
Code: Select all
cd /dir/for/git
git init
git add -A
#above is all to add all items. You can add specific items too
git add file1 file2 file3
git commit -m 'm is for message, add your message here'
git status #check current status
Code: Select all
ssh keygen -t rsa "email"
Code: Select all
cd ~/.ssh
<editor> id_rsa.pub
Code: Select all
cd /dir/for/git
git remote add origin [email protected]:gituser/reponame.git
git push origin master
When you are happy with you current state, you can create a branch, and work off the branch.
Code: Select all
git branch <branchname>
Code: Select all
git checkout <branchname>
Code: Select all
git checkout -b <branchname>
Code: Select all
git commit -m 'commit message'
git checkout master
# check the current working branch
git branch
git merge <branchname>
Code: Select all
git branch -d <branchname>
Code: Select all
git clone [email protected]:gituser/reponame.git
cd reponame
# track it
git remote add upstream git://github.com/gituser/reponame.git
git fetch upstream
# I generally do
git pull
Code: Select all
mkdir git
cd git
git clone .....
be happy and organized
Other cool stuff
Code: Select all
git diff
git log --graph
Hopefully I didn't leave anything important out.
Edit: IIRC when you add a remote origin,if its added as https, not ssh. You can change that with set-url
Code: Select all
git remote set-url origin [email protected]:gituser/reponame.git
Work hard; Complain less
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: Git help
Drew, thank you very much for the howto, this is a nice quick reference!
Noted. Give me a few days.Launfal wrote:- 686-nonpae
- no-x
- without emacs
- vim + plugins from http://wynnnetherland.com/journal/reed- ... or-writers
- git/tig
- powerline for tmux and vim
- spellchecker (aspell/ispell)
- some gimmicks like definition look-up, thesaurus, one-command-mount-all, fuse, lp
..gnutella..
Re: Git help
@ dkeg, thanks a lot for taking the time to put that together. I've printed it out, and I'll be working through it step by step to get a feel for how it all works.
Re: Git help
I think you covered the basics quite well. As the need for more knowledge presents itself, problems arise, etc. then I would expect that the vast wealth of knowledge that can be found regarding git will allow someone to organically find their own answers. Very cool of you to type this all out, and if there are specific questions that are not clearly answered by RTFM (they all are, but some are slightly confusing in execution or terminology at first), then feel free to ask.dkeg wrote:disclaimer, I'm sure Joe would have a more proper tutorial for this.
Re: Git help
Thanks for the tutorial, Drew, I now have my github ready: https://github.com/boccaperta-it :)
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: Git help
^ yeah thanks! It took me a while mainly because I didn't know what to commit on this thing. :D
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: Git help
^ I'd like to see team members storing their configs there, so that they are accessible at one point, and not only in the repos of the users. Of course this is completely optional :)
..gnutella..
Re: Git help
^ Ok, I added my .emacs, I'll see what I can add next.
Re: Git help
TIL about revert.
Very, very useful when you want to go back to a working commit (i.e.: Emacs trunk messed up by latest commits and you want a working release of that)
Code: Select all
git reset --hard <commit>
Re: Git help
Work hard; Complain less