How do I tag my git repository using the GitHub Mac application? - git-tag

I pretty new to GitHub and personally did not have time to learn too much command line. I prefer using the GitHub Mac app for my personal projects and I was curios if I can add tags with it.
Basically I just want to tag my projects v0.1 and so on. I'm not even sure this is the best way to do it.

From VonC's answer to the same question asked on SuperUser:
Both in their announcement and in the help section, this (tag) doesn't seem to be available (at the time of the writing of this answer).
That means GitHub for Mac doesn't manage yet the tags namespace (refs/tags), and that you need to tag manually, and then git push --tags to GitHub also manually.
Though that was a year ago, there's still nothing to indicate that tags are supported. There's still no mention in the help section, subsequent blog posts about it don't mention tags, nor do the release notes (though they only cover relatively recent versions).

Unfortunately, Github Client for Mac still doesn't handle tags.
Neither to create them or nor to retrieve them
The Github website on its side propose not only to retrieve tagged commits, but also show them as releases and propose automaticly generated zip and tar.gz bundles of the related source code.
see:
https://help.github.com/articles/working-with-tags
https://help.github.com/articles/about-releases
https://github.com/blog/1547-release-your-software
https://help.github.com/articles/creating-releases
The good news is that tag are pulled to you local repository when doing a "sync" or a "pull" from Github Client for Mac
As #blahdiblah said, you'll have to go through command lines to manage tags locally
The "official" documentation regarding tag manipulations in command line is there:
http://git-scm.com/book/en/Git-Basics-Tagging
Usage is very simple:
git tag list tags
git tag -a v1.4 -m 'my version 1.4' create a tag with a description
git show v1.4 show informations about a tag
git push origin --tags push last commits and the tags

To create a tag manually via the command line:
open Terminal and navigate to your repository (either via cd or just drag in the folder from Finder)
use the following commands:
git remote (displays the name of your remote, for example YourRemote)
git tag -a v1.2 -m 'tagging Version 1.2' (creates tag v1.2 from current branch)
git push YourRemote v1.2 (pushes the tag you've created to YourRemote)
http://pinkstone.co.uk/how-to-tag-a-release-in-git/

Related

Github as artifact repo in mlflow

Can we use github as one of the options in artifact repository in additions to the object storage support.
Github seems to be a natural way to capture changes in code between different runs/experiments, this will also give a way of tying down the revision of code used in a registered model.
Model version --> runs --> github version. Nothing golden than this.
Thoughts ?
If you run an experiment, while the source from which you ran is in GitHub, that commit is tied to the run.
Registering the model with that version will give the git commit with which the model was run and the subsequent registered version. See both images below.
The first shows the run with a git commit; the second shows that model is registered, with a clickable link (LOCAL_REGISTRY) from the registry UI back to the run UI with its git commit.

Is it possible to work on a rails project by two developers working on different OS but on same rails version

I have this confusion and perhaps it may be basic question. I am planning to work on a Rails project along with a friend who stays in a different location.
We have identified Heroku as our deployment platform and Bitbucket for SCM related activities.
Both me and my friend are new to rails but we are familiar with web development in general.
I m working on a Windows box while he is on a Mac. We both have the same rails version including the gems. However, I'm not sure really sure how do we manage the source code and code integration. The reason I say this is because, when we try to commit the entire code from our systems a few platform specific rails file gets uploaded on the server, thereby rendering the deployment useless.
So my question is if I am on Windows and my friend is on Mac, whats the recommended way of working together on a single RAILS project and deploy it on a common platform to get the same desired functionality.
Yes, by using the source control management (SCM) you selected when you set up your repository.
For instance, if you use git, you would copy your repository using git clone (the command is provided via the bitbucket interface by clicking on clone), make your changes, and then git push your changes back into the repository.
When you want to code next, execute a git pull command to get the latest repo changes and then work and git push your changes back to the repo.
For examples see Bitbuckets fantastic tutorial.
As a side note, bitbucket also supports mercurial, although I haven't used it.
As far as your actual issue, each person will need to make sure the platform dependent files are excluded from your repository. If you're using git, see the git book specifically the section on .gitignore and git rm

GIT deleted my local files

I have a pretty big problem. I am going through a Ruby on Rails tutorial, and they have suggested that I use GIT for version control. I have never used it before, and through the tutorial I don't think I used it right. Here is some back story.
I created a new project, and then I created a new Github repository. I named them the same thing, and I pushed my project to that repository. I then looked at Github, and all of my project files were there. I then went through a few chapters of the tutorial, and followed there instructions for pushing files to GIT. After awhile I realized, that none of my files were being uploaded. I didn't really care, so I went on with the tutorial. Still pushing files to GIT even though they were not showing up.
IMPORTANT
My Github repository only had the few files from when I first created it, the project on my local machine has a MANY more files. In the last chapter of the tutorial I was able to follow, it told me to do these commands:
$ git add .
$ git commit -m "Finish layout and routes"
$ git checkout master
$ git merge filling-in-layout
Once I did those commands, my project located on my local machine lost ALL of the files I created in the last couple of days. My guess is that Github replaced my files from my local machine with the files on Github (Just the files created when I started the project)
I think I have been adding files to GIT on my local machine since the folder '~/.git/logs/HEAD' has all of the commits I made, with what looks like GIT file numbers.
Any help would save me so many hours.
Thanks, -Chris
You committed some changes, then got the old version and reverted to it by issuing "git merge filling-in-layout". (you created a branch "filling-in-layout")
whatever you do DO NOT -> git reset --hard <- DO NOT.
what does "git branch" say?
do this:
git checkout master (or one of the others)
and look which one is yours. ;)
Erase github from your mind. It is irrelevant. The git repository is on your machine, inside your rails app folder. That is the beauty of git. So everything you have ever committed to git while working from that folder is there. It's possible you made some mistake along the way, or that the tutorial instructed you incorrectly, but you can look through all your commits with "git log", and then just go back to the point where things were good: checkout that commit (thus recreating the situation as it was at that moment), and pick up again from there.
Pedagogically I would suggest that you not try to learn git and rails simultaneously. They are both big and interesting, but they are completely orthogonal (that's fancy talk for "they have nothing to do with one another"). If you want to learn rails, learn rails. If you want to learn git, learn git. Just a suggestion.

Rails: Rubymine: GitHub

I can't seem to figure out how to commit my files to GitHub.
I am using RubyMine 4.5 on the MAC
I have git set up locally
I have a private account on GitHub
From the RubyMine Preferences, I have my GitHub credentials properly set up (and acknowledged as such by RubyMine), but it did not give me an option to select a repository on GitHub.
How do I commit file to the GitHub repository? There are too many CVS and Git menu items in RubyMine.
PS: I've read the online help sections (the only thing available to me), and I followed the instructions in the GitHub integration, but the directory I'm trying to commit is failing to push to GitHub, with RubyMine telling me that there was nothing to commit. This is the first time I use RubyMine for GitHub. Nothing about this on StackOverflow.
Okay, I think I've recreated your situation locally and it appears that RubyMine has terrible support for managing remotes. If you create a Git repository locally, then (separately) create a repository on GitHub, there's no obvious way to marry the two from within RubyMine.
Basically, you need to set up GitHub as a remote for your local repository from the shell, and once that's done then RubyMine will be able to push as normal.
Please note that the below instructions assume you want to overwrite your GitHub repository with the full history from your local repository -- If your GitHub repository has data that you do not want to lose, do not execute these commands! See Below.
Open up Terminal:
cd /path/to/my/project/root
git remote add origin https://github.com/yourusername/yourrepo.git
git push -u origin +master
Now, RubyMine should be able to push to your GitHub repository via VCS > Git > Push
If your GitHub repository has already been committed to and you don't want to lose those changes, you'll need to either create a new GitHub repo or clone your GitHub repo into another folder and merge your local repository into the clone.
This can be avoided entirely if you're trying to push your existing local repository to a new GitHub repo: Simply use the VCS > Import into Version Control > Share project on GitHub option and use the dialog to create a new GitHub repository.

Whats the best way to work with Github and multiple computers?

I am developing some school grading software and decided to use Github to host the project. After building some code on my Ubuntu box I pushed it to Github and then cloned it down to my MacBook Pro. After editing the code on the MBP I pushed it back to Github. The next morning I tried to update my repo on the Ubuntu box with a git pull and it gave me all kinds of trouble.
Whats the best way to work in this situation? I don't want to fork my own repo and I don't really want to send myself emails or pull requests. Why can't I just treat Github like a master and push/pull from it onto all of my personal repos on different computers?
I'll assume your problem was that the machine on which you first created the repo crapped out when you tried to issue the git pull command.
When you clone an existing git repository (like you did on your 2nd machine, the MacBook Pro), you're automatically set up to so your git pull commands will automatically merge the remote with your local changes.
However, when you initially create a repo and then share it on a remote repository, you have to issue a few commands to make things as automated as a on cloned repo.
# GitHub gives you that instruction, you've already done that
# git remote add origin git#github.com:user_name/repo_name.git
# GitHub doesn't specify the following instructions
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
These last few instructions configure git so future git pull's from this repo will merge all remote changes automatically.
The following is a bit of shameless self-promotion. If you use Ruby, I have created a Ruby-based tool that lets you deal with all these kinds of things with git remote branches. The tool is called, unsurprisingly, git_remote_branch :-)
If you don't use Ruby, my tool is probably gonna be too much of a hassle to install. What you can do is look at an old post on my blog, where most of the stuff grb can do for you was explicitly shown. Whip out your git notes file :-)
You can also add multiple SSH public keys.

Resources